diff --git a/CHANGELOG.md b/CHANGELOG.md index 7805997..1c88d37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +# dbt_salesforce_source v1.1.0 +[PR #48](https://github.com/fivetran/dbt_salesforce_source/pull/48) includes the following updates: + +## 🚨 Breaking Change 🚨 +- Added logic to support user-specified scenarios where the Fivetran Salesforce connector syncs column names using the original Salesforce API naming convention. For example, while Fivetran typically provides the column as `created_date`, some users might choose to receive it as `CreatedDate` according to the API naming. This update ensures the package is automatically compatible with both naming conventions. + - Specifically, the package now performs a COALESCE, preferring the original Salesforce API naming. If the original naming is not present, the Fivetran version is used instead. + - Renamed columns are now explicitly cast to prevent conflicts during the COALESCE. + - ❗This change is considered breaking since the resulting column types may differ from prior versions of this package. + +## Under the Hood +- Added the following macros to support the mentioned bug fix logic: + - `add_renamed_columns`: Determines the original names for each column and adds them to the list generated within each `get_*_columns` macro. By default, this macro processes column names by removing underscores and capitalizing each part that follows an underscore. This ensures all necessary columns are available for use in the `coalesce_rename` macro. Additionally, this macro tags each column with its renamed version to maintain tracking. + - `column_list_to_dict`: Converts the list of dictionaries generated by the `get_*_columns` macros into a dictionary of dictionaries for use in the `coalesce_rename` macro. This conversion is necessary so that each column dictionary entry can be accessed by a key, rather than iterating through a list. + - `coalesce_rename`: Utilizes the dictionary generated by `column_list_to_dict` to coalesce a column with its renamed counterpart, producing the final column. This macro also allows for the passing of a custom renamed spelling, datatype, and alias as arguments to override default values. +- Added validation test to ensure the final column names generated before and after this update remain the same. + # dbt_salesforce_source v1.0.1 [PR #44](https://github.com/fivetran/dbt_salesforce_source/pull/44) includes the following updates: diff --git a/README.md b/README.md index 343562e..5d30bde 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ If you are **not** using the [Salesforce transformation package](https://github. ```yaml packages: - package: fivetran/salesforce_source - version: [">=1.0.0", "<1.1.0"] # we recommend using ranges to capture non-breaking changes automatically + version: [">=1.1.0", "<1.2.0"] # we recommend using ranges to capture non-breaking changes automatically ``` ## Step 3: Configure Your Variables ### Database and Schema Variables (Using the standard Salesforce schema only) diff --git a/dbt_project.yml b/dbt_project.yml index 98ba403..51d5a76 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,6 +1,6 @@ config-version: 2 name: 'salesforce_source' -version: '1.0.1' +version: '1.1.0' require-dbt-version: [">=1.3.0", "<2.0.0"] models: salesforce_source: diff --git a/docs/catalog.json b/docs/catalog.json index 3727f5f..2700868 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.6.3", "generated_at": "2023-10-30T18:30:51.891265Z", "invocation_id": "481200b0-f7e9-41c0-8b43-483f2b50ff1c", "env": {}}, "nodes": {"seed.salesforce_source_integration_tests.sf_account_data": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_account_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_number": {"type": "integer", "index": 2, "name": "account_number", "comment": null}, "account_source": {"type": "text", "index": 3, "name": "account_source", "comment": null}, "annual_revenue": {"type": "double precision", "index": 4, "name": "annual_revenue", "comment": null}, "billing_city": {"type": "text", "index": 5, "name": "billing_city", "comment": null}, "billing_country": {"type": "text", "index": 6, "name": "billing_country", "comment": null}, "billing_country_code": {"type": "text", "index": 7, "name": "billing_country_code", "comment": null}, "billing_geocode_accuracy": {"type": "integer", "index": 8, "name": "billing_geocode_accuracy", "comment": null}, "billing_latitude": {"type": "double precision", "index": 9, "name": "billing_latitude", "comment": null}, "billing_longitude": {"type": "double precision", "index": 10, "name": "billing_longitude", "comment": null}, "billing_postal_code": {"type": "text", "index": 11, "name": "billing_postal_code", "comment": null}, "billing_state": {"type": "text", "index": 12, "name": "billing_state", "comment": null}, "billing_state_code": {"type": "text", "index": 13, "name": "billing_state_code", "comment": null}, "billing_street": {"type": "text", "index": 14, "name": "billing_street", "comment": null}, "description": {"type": "text", "index": 15, "name": "description", "comment": null}, "fax": {"type": "integer", "index": 16, "name": "fax", "comment": null}, "id": {"type": "text", "index": 17, "name": "id", "comment": null}, "industry": {"type": "text", "index": 18, "name": "industry", "comment": null}, "is_deleted": {"type": "boolean", "index": 19, "name": "is_deleted", "comment": null}, "jigsaw_company_id": {"type": "integer", "index": 20, "name": "jigsaw_company_id", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 21, "name": "last_activity_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 22, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 23, "name": "last_viewed_date", "comment": null}, "master_record_id": {"type": "text", "index": 24, "name": "master_record_id", "comment": null}, "name": {"type": "text", "index": 25, "name": "name", "comment": null}, "number_of_employees": {"type": "integer", "index": 26, "name": "number_of_employees", "comment": null}, "owner_id": {"type": "text", "index": 27, "name": "owner_id", "comment": null}, "ownership": {"type": "integer", "index": 28, "name": "ownership", "comment": null}, "parent_id": {"type": "integer", "index": 29, "name": "parent_id", "comment": null}, "phone": {"type": "text", "index": 30, "name": "phone", "comment": null}, "photo_url": {"type": "text", "index": 31, "name": "photo_url", "comment": null}, "rating": {"type": "integer", "index": 32, "name": "rating", "comment": null}, "record_type_id": {"type": "text", "index": 33, "name": "record_type_id", "comment": null}, "shipping_city": {"type": "integer", "index": 34, "name": "shipping_city", "comment": null}, "shipping_country": {"type": "text", "index": 35, "name": "shipping_country", "comment": null}, "shipping_country_code": {"type": "text", "index": 36, "name": "shipping_country_code", "comment": null}, "shipping_geocode_accuracy": {"type": "integer", "index": 37, "name": "shipping_geocode_accuracy", "comment": null}, "shipping_latitude": {"type": "double precision", "index": 38, "name": "shipping_latitude", "comment": null}, "shipping_longitude": {"type": "double precision", "index": 39, "name": "shipping_longitude", "comment": null}, "shipping_postal_code": {"type": "integer", "index": 40, "name": "shipping_postal_code", "comment": null}, "shipping_state": {"type": "integer", "index": 41, "name": "shipping_state", "comment": null}, "shipping_state_code": {"type": "integer", "index": 42, "name": "shipping_state_code", "comment": null}, "shipping_street": {"type": "integer", "index": 43, "name": "shipping_street", "comment": null}, "sic": {"type": "integer", "index": 44, "name": "sic", "comment": null}, "sic_desc": {"type": "integer", "index": 45, "name": "sic_desc", "comment": null}, "site": {"type": "integer", "index": 46, "name": "site", "comment": null}, "ticker_symbol": {"type": "integer", "index": 47, "name": "ticker_symbol", "comment": null}, "type": {"type": "text", "index": 48, "name": "type", "comment": null}, "website": {"type": "text", "index": 49, "name": "website", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 50, "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.salesforce_source_integration_tests.sf_account_data"}, "seed.salesforce_source_integration_tests.sf_account_history_data": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_account_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_active": {"type": "boolean", "index": 1, "name": "_fivetran_active", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_end", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "account_number": {"type": "integer", "index": 5, "name": "account_number", "comment": null}, "account_source": {"type": "text", "index": 6, "name": "account_source", "comment": null}, "annual_revenue": {"type": "double precision", "index": 7, "name": "annual_revenue", "comment": null}, "billing_city": {"type": "text", "index": 8, "name": "billing_city", "comment": null}, "billing_country": {"type": "text", "index": 9, "name": "billing_country", "comment": null}, "billing_postal_code": {"type": "text", "index": 10, "name": "billing_postal_code", "comment": null}, "billing_state": {"type": "text", "index": 11, "name": "billing_state", "comment": null}, "billing_street": {"type": "text", "index": 12, "name": "billing_street", "comment": null}, "description": {"type": "text", "index": 13, "name": "description", "comment": null}, "id": {"type": "text", "index": 14, "name": "id", "comment": null}, "industry": {"type": "text", "index": 15, "name": "industry", "comment": null}, "is_deleted": {"type": "boolean", "index": 16, "name": "is_deleted", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 17, "name": "last_activity_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 18, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 19, "name": "last_viewed_date", "comment": null}, "master_record_id": {"type": "text", "index": 20, "name": "master_record_id", "comment": null}, "name": {"type": "text", "index": 21, "name": "name", "comment": null}, "number_of_employees": {"type": "integer", "index": 22, "name": "number_of_employees", "comment": null}, "owner_id": {"type": "text", "index": 23, "name": "owner_id", "comment": null}, "ownership": {"type": "integer", "index": 24, "name": "ownership", "comment": null}, "parent_id": {"type": "integer", "index": 25, "name": "parent_id", "comment": null}, "rating": {"type": "integer", "index": 26, "name": "rating", "comment": null}, "record_type_id": {"type": "text", "index": 27, "name": "record_type_id", "comment": null}, "shipping_city": {"type": "integer", "index": 28, "name": "shipping_city", "comment": null}, "shipping_country": {"type": "text", "index": 29, "name": "shipping_country", "comment": null}, "shipping_postal_code": {"type": "integer", "index": 30, "name": "shipping_postal_code", "comment": null}, "shipping_state": {"type": "integer", "index": 31, "name": "shipping_state", "comment": null}, "shipping_street": {"type": "integer", "index": 32, "name": "shipping_street", "comment": null}, "type": {"type": "text", "index": 33, "name": "type", "comment": null}, "website": {"type": "text", "index": 34, "name": "website", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.salesforce_source_integration_tests.sf_account_history_data"}, "seed.salesforce_source_integration_tests.sf_contact_data": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_contact_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "cbit_clearbit_c": {"type": "text", "index": 4, "name": "cbit_clearbit_c", "comment": null}, "cbit_clearbit_ready_c": {"type": "boolean", "index": 5, "name": "cbit_clearbit_ready_c", "comment": null}, "created_by_id": {"type": "text", "index": 6, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 7, "name": "created_date", "comment": null}, "department": {"type": "integer", "index": 8, "name": "department", "comment": null}, "email": {"type": "text", "index": 9, "name": "email", "comment": null}, "email_bounced_date": {"type": "timestamp without time zone", "index": 10, "name": "email_bounced_date", "comment": null}, "email_bounced_reason": {"type": "integer", "index": 11, "name": "email_bounced_reason", "comment": null}, "fax": {"type": "integer", "index": 12, "name": "fax", "comment": null}, "first_name": {"type": "text", "index": 13, "name": "first_name", "comment": null}, "is_deleted": {"type": "boolean", "index": 14, "name": "is_deleted", "comment": null}, "is_email_bounced": {"type": "boolean", "index": 15, "name": "is_email_bounced", "comment": null}, "jigsaw_contact_id": {"type": "integer", "index": 16, "name": "jigsaw_contact_id", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 17, "name": "last_activity_date", "comment": null}, "last_curequest_date": {"type": "timestamp without time zone", "index": 18, "name": "last_curequest_date", "comment": null}, "last_cuupdate_date": {"type": "timestamp without time zone", "index": 19, "name": "last_cuupdate_date", "comment": null}, "last_modified_by_id": {"type": "text", "index": 20, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 21, "name": "last_modified_date", "comment": null}, "last_name": {"type": "text", "index": 22, "name": "last_name", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 23, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 24, "name": "last_viewed_date", "comment": null}, "mailing_city": {"type": "text", "index": 25, "name": "mailing_city", "comment": null}, "mailing_country": {"type": "text", "index": 26, "name": "mailing_country", "comment": null}, "mailing_country_code": {"type": "text", "index": 27, "name": "mailing_country_code", "comment": null}, "mailing_geocode_accuracy": {"type": "integer", "index": 28, "name": "mailing_geocode_accuracy", "comment": null}, "mailing_latitude": {"type": "integer", "index": 29, "name": "mailing_latitude", "comment": null}, "mailing_longitude": {"type": "integer", "index": 30, "name": "mailing_longitude", "comment": null}, "mailing_postal_code": {"type": "integer", "index": 31, "name": "mailing_postal_code", "comment": null}, "mailing_state": {"type": "text", "index": 32, "name": "mailing_state", "comment": null}, "mailing_state_code": {"type": "text", "index": 33, "name": "mailing_state_code", "comment": null}, "mailing_street": {"type": "text", "index": 34, "name": "mailing_street", "comment": null}, "master_record_id": {"type": "integer", "index": 35, "name": "master_record_id", "comment": null}, "mc_4_sf_mc_subscriber_c": {"type": "integer", "index": 36, "name": "mc_4_sf_mc_subscriber_c", "comment": null}, "mobile_phone": {"type": "integer", "index": 37, "name": "mobile_phone", "comment": null}, "name": {"type": "text", "index": 38, "name": "name", "comment": null}, "owner_id": {"type": "text", "index": 39, "name": "owner_id", "comment": null}, "phone": {"type": "text", "index": 40, "name": "phone", "comment": null}, "photo_url": {"type": "text", "index": 41, "name": "photo_url", "comment": null}, "reports_to_id": {"type": "integer", "index": 42, "name": "reports_to_id", "comment": null}, "salutation": {"type": "integer", "index": 43, "name": "salutation", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 44, "name": "system_modstamp", "comment": null}, "title": {"type": "text", "index": 45, "name": "title", "comment": null}, "email_bounced_c": {"type": "boolean", "index": 46, "name": "email_bounced_c", "comment": null}, "email_quality_unknown_c": {"type": "boolean", "index": 47, "name": "email_quality_unknown_c", "comment": null}, "gclid_c": {"type": "integer", "index": 48, "name": "gclid_c", "comment": null}, "referral_account_c": {"type": "integer", "index": 49, "name": "referral_account_c", "comment": null}, "referral_contact_c": {"type": "integer", "index": 50, "name": "referral_contact_c", "comment": null}, "has_opted_out_of_email": {"type": "boolean", "index": 51, "name": "has_opted_out_of_email", "comment": null}, "act_on_lead_score_c": {"type": "integer", "index": 52, "name": "act_on_lead_score_c", "comment": null}, "cbit_created_by_clearbit_c": {"type": "boolean", "index": 53, "name": "cbit_created_by_clearbit_c", "comment": null}, "fivetran_user_id_c": {"type": "integer", "index": 54, "name": "fivetran_user_id_c", "comment": null}, "no_longer_at_company_c": {"type": "boolean", "index": 55, "name": "no_longer_at_company_c", "comment": null}, "pi_campaign_c": {"type": "text", "index": 56, "name": "pi_campaign_c", "comment": null}, "pi_comments_c": {"type": "integer", "index": 57, "name": "pi_comments_c", "comment": null}, "pi_conversion_date_c": {"type": "integer", "index": 58, "name": "pi_conversion_date_c", "comment": null}, "pi_conversion_object_name_c": {"type": "integer", "index": 59, "name": "pi_conversion_object_name_c", "comment": null}, "pi_conversion_object_type_c": {"type": "integer", "index": 60, "name": "pi_conversion_object_type_c", "comment": null}, "pi_created_date_c": {"type": "timestamp without time zone", "index": 61, "name": "pi_created_date_c", "comment": null}, "pi_first_activity_c": {"type": "integer", "index": 62, "name": "pi_first_activity_c", "comment": null}, "pi_first_search_term_c": {"type": "integer", "index": 63, "name": "pi_first_search_term_c", "comment": null}, "pi_first_search_type_c": {"type": "integer", "index": 64, "name": "pi_first_search_type_c", "comment": null}, "pi_first_touch_url_c": {"type": "integer", "index": 65, "name": "pi_first_touch_url_c", "comment": null}, "pi_grade_c": {"type": "integer", "index": 66, "name": "pi_grade_c", "comment": null}, "pi_last_activity_c": {"type": "integer", "index": 67, "name": "pi_last_activity_c", "comment": null}, "pi_needs_score_synced_c": {"type": "boolean", "index": 68, "name": "pi_needs_score_synced_c", "comment": null}, "pi_notes_c": {"type": "integer", "index": 69, "name": "pi_notes_c", "comment": null}, "pi_pardot_hard_bounced_c": {"type": "boolean", "index": 70, "name": "pi_pardot_hard_bounced_c", "comment": null}, "pi_pardot_last_scored_at_c": {"type": "integer", "index": 71, "name": "pi_pardot_last_scored_at_c", "comment": null}, "pi_score_c": {"type": "integer", "index": 72, "name": "pi_score_c", "comment": null}, "pi_url_c": {"type": "text", "index": 73, "name": "pi_url_c", "comment": null}, "pi_utm_campaign_c": {"type": "integer", "index": 74, "name": "pi_utm_campaign_c", "comment": null}, "pi_utm_content_c": {"type": "integer", "index": 75, "name": "pi_utm_content_c", "comment": null}, "pi_utm_medium_c": {"type": "integer", "index": 76, "name": "pi_utm_medium_c", "comment": null}, "pi_utm_source_c": {"type": "integer", "index": 77, "name": "pi_utm_source_c", "comment": null}, "pi_utm_term_c": {"type": "integer", "index": 78, "name": "pi_utm_term_c", "comment": null}, "lead_source": {"type": "text", "index": 79, "name": "lead_source", "comment": null}, "contact_status_c": {"type": "text", "index": 80, "name": "contact_status_c", "comment": null}, "region_c": {"type": "integer", "index": 81, "name": "region_c", "comment": null}, "competitor_c": {"type": "integer", "index": 82, "name": "competitor_c", "comment": null}, "bt_stripe_gender_c": {"type": "integer", "index": 83, "name": "bt_stripe_gender_c", "comment": null}, "bt_stripe_ssn_last_4_encrypted_c": {"type": "integer", "index": 84, "name": "bt_stripe_ssn_last_4_encrypted_c", "comment": null}, "bt_stripe_personal_id_number_c": {"type": "integer", "index": 85, "name": "bt_stripe_personal_id_number_c", "comment": null}, "bt_stripe_personal_id_number_encrypted_c": {"type": "integer", "index": 86, "name": "bt_stripe_personal_id_number_encrypted_c", "comment": null}, "bt_stripe_maiden_name_c": {"type": "integer", "index": 87, "name": "bt_stripe_maiden_name_c", "comment": null}, "bt_stripe_languages_c": {"type": "integer", "index": 88, "name": "bt_stripe_languages_c", "comment": null}, "bt_stripe_default_payment_method_c": {"type": "integer", "index": 89, "name": "bt_stripe_default_payment_method_c", "comment": null}, "bt_stripe_ssn_last_4_c": {"type": "integer", "index": 90, "name": "bt_stripe_ssn_last_4_c", "comment": null}, "bt_stripe_personal_id_type_c": {"type": "integer", "index": 91, "name": "bt_stripe_personal_id_type_c", "comment": null}, "bt_stripe_default_payment_gateway_c": {"type": "integer", "index": 92, "name": "bt_stripe_default_payment_gateway_c", "comment": null}, "bt_stripe_level_c": {"type": "integer", "index": 93, "name": "bt_stripe_level_c", "comment": null}, "lean_data_routing_action_c": {"type": "text", "index": 94, "name": "lean_data_routing_action_c", "comment": null}, "lean_data_matched_buyer_persona_c": {"type": "integer", "index": 95, "name": "lean_data_matched_buyer_persona_c", "comment": null}, "lean_data_ld_segment_c": {"type": "integer", "index": 96, "name": "lean_data_ld_segment_c", "comment": null}, "lean_data_tag_c": {"type": "integer", "index": 97, "name": "lean_data_tag_c", "comment": null}, "lean_data_modified_score_c": {"type": "integer", "index": 98, "name": "lean_data_modified_score_c", "comment": null}, "do_not_route_lead_c": {"type": "boolean", "index": 99, "name": "do_not_route_lead_c", "comment": null}, "technical_contact_c": {"type": "integer", "index": 100, "name": "technical_contact_c", "comment": null}, "allbound_id_c": {"type": "integer", "index": 101, "name": "allbound_id_c", "comment": null}, "notes_c": {"type": "integer", "index": 102, "name": "notes_c", "comment": null}, "netsuite_conn_sync_in_progress_c": {"type": "boolean", "index": 103, "name": "netsuite_conn_sync_in_progress_c", "comment": null}, "netsuite_conn_celigo_update_c": {"type": "boolean", "index": 104, "name": "netsuite_conn_celigo_update_c", "comment": null}, "netsuite_conn_net_suite_id_c": {"type": "integer", "index": 105, "name": "netsuite_conn_net_suite_id_c", "comment": null}, "netsuite_conn_net_suite_sync_err_c": {"type": "integer", "index": 106, "name": "netsuite_conn_net_suite_sync_err_c", "comment": null}, "netsuite_conn_push_to_net_suite_c": {"type": "boolean", "index": 107, "name": "netsuite_conn_push_to_net_suite_c", "comment": null}, "netsuite_conn_pushed_from_opportunity_c": {"type": "boolean", "index": 108, "name": "netsuite_conn_pushed_from_opportunity_c", "comment": null}, "description": {"type": "text", "index": 109, "name": "description", "comment": null}, "lid_linked_in_company_id_c": {"type": "integer", "index": 110, "name": "lid_linked_in_company_id_c", "comment": null}, "lid_linked_in_member_token_c": {"type": "integer", "index": 111, "name": "lid_linked_in_member_token_c", "comment": null}, "is_eu_resident_c": {"type": "boolean", "index": 112, "name": "is_eu_resident_c", "comment": null}, "do_not_call": {"type": "boolean", "index": 113, "name": "do_not_call", "comment": null}, "sales_loft_1_most_recent_cadence_next_step_due_date_c": {"type": "integer", "index": 114, "name": "sales_loft_1_most_recent_cadence_next_step_due_date_c", "comment": null}, "sales_loft_1_most_recent_last_completed_step_c": {"type": "integer", "index": 115, "name": "sales_loft_1_most_recent_last_completed_step_c", "comment": null}, "sales_loft_1_most_recent_cadence_name_c": {"type": "integer", "index": 116, "name": "sales_loft_1_most_recent_cadence_name_c", "comment": null}, "source_detail_c": {"type": "text", "index": 117, "name": "source_detail_c", "comment": null}, "utm_source_c": {"type": "integer", "index": 118, "name": "utm_source_c", "comment": null}, "utm_content_c": {"type": "integer", "index": 119, "name": "utm_content_c", "comment": null}, "utm_term_c": {"type": "integer", "index": 120, "name": "utm_term_c", "comment": null}, "utm_medium_c": {"type": "integer", "index": 121, "name": "utm_medium_c", "comment": null}, "utm_campaign_c": {"type": "integer", "index": 122, "name": "utm_campaign_c", "comment": null}, "network_c": {"type": "integer", "index": 123, "name": "network_c", "comment": null}, "matchtype_c": {"type": "integer", "index": 124, "name": "matchtype_c", "comment": null}, "device_c": {"type": "integer", "index": 125, "name": "device_c", "comment": null}, "creative_c": {"type": "integer", "index": 126, "name": "creative_c", "comment": null}, "adgroupid_c": {"type": "integer", "index": 127, "name": "adgroupid_c", "comment": null}, "keyword_c": {"type": "integer", "index": 128, "name": "keyword_c", "comment": null}, "campaignid_c": {"type": "integer", "index": 129, "name": "campaignid_c", "comment": null}, "partner_rep_email_c": {"type": "integer", "index": 130, "name": "partner_rep_email_c", "comment": null}, "partner_rep_name_c": {"type": "integer", "index": 131, "name": "partner_rep_name_c", "comment": null}, "contact_type_c": {"type": "integer", "index": 132, "name": "contact_type_c", "comment": null}, "old_lead_source_c": {"type": "integer", "index": 133, "name": "old_lead_source_c", "comment": null}, "old_lead_source_detail_c": {"type": "integer", "index": 134, "name": "old_lead_source_detail_c", "comment": null}, "contact_stage_c": {"type": "integer", "index": 135, "name": "contact_stage_c", "comment": null}, "original_utm_campaign_c": {"type": "integer", "index": 136, "name": "original_utm_campaign_c", "comment": null}, "original_utm_content_c": {"type": "integer", "index": 137, "name": "original_utm_content_c", "comment": null}, "original_utm_medium_c": {"type": "integer", "index": 138, "name": "original_utm_medium_c", "comment": null}, "original_utm_source_c": {"type": "integer", "index": 139, "name": "original_utm_source_c", "comment": null}, "original_utm_term_c": {"type": "integer", "index": 140, "name": "original_utm_term_c", "comment": null}, "es_app_escreated_timestamp_c": {"type": "integer", "index": 141, "name": "es_app_escreated_timestamp_c", "comment": null}, "es_app_esecid_c": {"type": "integer", "index": 142, "name": "es_app_esecid_c", "comment": null}, "es_app_esenriched_c": {"type": "integer", "index": 143, "name": "es_app_esenriched_c", "comment": null}, "es_app_esenriched_timestamp_c": {"type": "integer", "index": 144, "name": "es_app_esenriched_timestamp_c", "comment": null}, "es_app_esintent_aggregate_score_c": {"type": "integer", "index": 145, "name": "es_app_esintent_aggregate_score_c", "comment": null}, "es_app_esintent_timestamp_c": {"type": "integer", "index": 146, "name": "es_app_esintent_timestamp_c", "comment": null}, "es_app_esintent_topics_c": {"type": "integer", "index": 147, "name": "es_app_esintent_topics_c", "comment": null}, "es_app_esoverall_fit_score_c": {"type": "integer", "index": 148, "name": "es_app_esoverall_fit_score_c", "comment": null}, "es_app_essource_c": {"type": "integer", "index": 149, "name": "es_app_essource_c", "comment": null}, "individual_id": {"type": "integer", "index": 150, "name": "individual_id", "comment": null}, "marketing_process_c": {"type": "integer", "index": 151, "name": "marketing_process_c", "comment": null}, "automation_tracking_c": {"type": "integer", "index": 152, "name": "automation_tracking_c", "comment": null}, "user_gems_has_changed_job_c": {"type": "integer", "index": 153, "name": "user_gems_has_changed_job_c", "comment": null}, "email_opt_in_explicit_c": {"type": "integer", "index": 154, "name": "email_opt_in_explicit_c", "comment": null}, "email_opt_in_implicit_c": {"type": "integer", "index": 155, "name": "email_opt_in_implicit_c", "comment": null}, "gdpr_opt_in_explicit_c": {"type": "integer", "index": 156, "name": "gdpr_opt_in_explicit_c", "comment": null}, "user_gems_is_a_user_gem_c": {"type": "integer", "index": 157, "name": "user_gems_is_a_user_gem_c", "comment": null}, "user_gems_past_account_c": {"type": "integer", "index": 158, "name": "user_gems_past_account_c", "comment": null}, "user_gems_past_company_c": {"type": "integer", "index": 159, "name": "user_gems_past_company_c", "comment": null}, "user_gems_past_contact_c": {"type": "integer", "index": 160, "name": "user_gems_past_contact_c", "comment": null}, "user_gems_past_title_c": {"type": "integer", "index": 161, "name": "user_gems_past_title_c", "comment": null}, "partner_contact_c": {"type": "integer", "index": 162, "name": "partner_contact_c", "comment": null}, "promotion_id_c": {"type": "integer", "index": 163, "name": "promotion_id_c", "comment": null}, "referral_exists_c": {"type": "integer", "index": 164, "name": "referral_exists_c", "comment": null}, "referral_first_name_c": {"type": "integer", "index": 165, "name": "referral_first_name_c", "comment": null}, "referral_last_name_c": {"type": "integer", "index": 166, "name": "referral_last_name_c", "comment": null}, "mkto_71_contact_acquisition_date_c": {"type": "integer", "index": 167, "name": "mkto_71_contact_acquisition_date_c", "comment": null}, "mkto_71_contact_acquisition_program_c": {"type": "integer", "index": 168, "name": "mkto_71_contact_acquisition_program_c", "comment": null}, "mkto_71_contact_acquisition_program_id_c": {"type": "integer", "index": 169, "name": "mkto_71_contact_acquisition_program_id_c", "comment": null}, "mkto_71_contact_inferred_city_c": {"type": "integer", "index": 170, "name": "mkto_71_contact_inferred_city_c", "comment": null}, "mkto_71_contact_inferred_company_c": {"type": "integer", "index": 171, "name": "mkto_71_contact_inferred_company_c", "comment": null}, "mkto_71_contact_inferred_country_c": {"type": "integer", "index": 172, "name": "mkto_71_contact_inferred_country_c", "comment": null}, "mkto_71_contact_inferred_metropolitan_a_c": {"type": "integer", "index": 173, "name": "mkto_71_contact_inferred_metropolitan_a_c", "comment": null}, "mkto_71_contact_inferred_phone_area_cod_c": {"type": "integer", "index": 174, "name": "mkto_71_contact_inferred_phone_area_cod_c", "comment": null}, "mkto_71_contact_inferred_postal_code_c": {"type": "integer", "index": 175, "name": "mkto_71_contact_inferred_postal_code_c", "comment": null}, "mkto_71_contact_inferred_state_region_c": {"type": "integer", "index": 176, "name": "mkto_71_contact_inferred_state_region_c", "comment": null}, "mkto_71_contact_lead_score_c": {"type": "integer", "index": 177, "name": "mkto_71_contact_lead_score_c", "comment": null}, "mkto_71_contact_original_referrer_c": {"type": "integer", "index": 178, "name": "mkto_71_contact_original_referrer_c", "comment": null}, "mkto_71_contact_original_search_engine_c": {"type": "integer", "index": 179, "name": "mkto_71_contact_original_search_engine_c", "comment": null}, "mkto_71_contact_original_search_phrase_c": {"type": "integer", "index": 180, "name": "mkto_71_contact_original_search_phrase_c", "comment": null}, "mkto_71_contact_original_source_info_c": {"type": "integer", "index": 181, "name": "mkto_71_contact_original_source_info_c", "comment": null}, "mkto_71_contact_original_source_type_c": {"type": "integer", "index": 182, "name": "mkto_71_contact_original_source_type_c", "comment": null}, "mkto_si_hide_date_c": {"type": "integer", "index": 183, "name": "mkto_si_hide_date_c", "comment": null}, "mkto_si_last_interesting_moment_date_c": {"type": "integer", "index": 184, "name": "mkto_si_last_interesting_moment_date_c", "comment": null}, "mkto_si_last_interesting_moment_desc_c": {"type": "integer", "index": 185, "name": "mkto_si_last_interesting_moment_desc_c", "comment": null}, "mkto_si_last_interesting_moment_source_c": {"type": "integer", "index": 186, "name": "mkto_si_last_interesting_moment_source_c", "comment": null}, "mkto_si_last_interesting_moment_type_c": {"type": "integer", "index": 187, "name": "mkto_si_last_interesting_moment_type_c", "comment": null}, "mkto_si_mkto_lead_score_c": {"type": "integer", "index": 188, "name": "mkto_si_mkto_lead_score_c", "comment": null}, "mkto_si_priority_c": {"type": "integer", "index": 189, "name": "mkto_si_priority_c", "comment": null}, "mkto_si_relative_score_value_c": {"type": "integer", "index": 190, "name": "mkto_si_relative_score_value_c", "comment": null}, "mkto_si_urgency_value_c": {"type": "integer", "index": 191, "name": "mkto_si_urgency_value_c", "comment": null}, "cloudingo_agent_ces_c": {"type": "integer", "index": 192, "name": "cloudingo_agent_ces_c", "comment": null}, "cloudingo_agent_mar_c": {"type": "integer", "index": 193, "name": "cloudingo_agent_mar_c", "comment": null}, "cloudingo_agent_mas_c": {"type": "integer", "index": 194, "name": "cloudingo_agent_mas_c", "comment": null}, "cloudingo_agent_mav_c": {"type": "integer", "index": 195, "name": "cloudingo_agent_mav_c", "comment": null}, "cloudingo_agent_mrdi_c": {"type": "integer", "index": 196, "name": "cloudingo_agent_mrdi_c", "comment": null}, "cloudingo_agent_mtz_c": {"type": "integer", "index": 197, "name": "cloudingo_agent_mtz_c", "comment": null}, "cloudingo_agent_oar_c": {"type": "integer", "index": 198, "name": "cloudingo_agent_oar_c", "comment": null}, "cloudingo_agent_oas_c": {"type": "integer", "index": 199, "name": "cloudingo_agent_oas_c", "comment": null}, "cloudingo_agent_oav_c": {"type": "integer", "index": 200, "name": "cloudingo_agent_oav_c", "comment": null}, "cloudingo_agent_ordi_c": {"type": "integer", "index": 201, "name": "cloudingo_agent_ordi_c", "comment": null}, "cloudingo_agent_otz_c": {"type": "integer", "index": 202, "name": "cloudingo_agent_otz_c", "comment": null}, "do_not_sync_marketo_c": {"type": "integer", "index": 203, "name": "do_not_sync_marketo_c", "comment": null}, "phone_extension_c": {"type": "integer", "index": 204, "name": "phone_extension_c", "comment": null}, "job_function_c": {"type": "integer", "index": 205, "name": "job_function_c", "comment": null}, "job_level_c": {"type": "integer", "index": 206, "name": "job_level_c", "comment": null}, "direct_office_c": {"type": "integer", "index": 207, "name": "direct_office_c", "comment": null}, "city_c": {"type": "integer", "index": 208, "name": "city_c", "comment": null}, "country_c": {"type": "integer", "index": 209, "name": "country_c", "comment": null}, "state_c": {"type": "integer", "index": 210, "name": "state_c", "comment": null}, "secondary_email_c": {"type": "integer", "index": 211, "name": "secondary_email_c", "comment": null}, "es_seniority_c": {"type": "integer", "index": 212, "name": "es_seniority_c", "comment": null}, "source_last_lead_source_c": {"type": "integer", "index": 213, "name": "source_last_lead_source_c", "comment": null}, "source_last_lead_source_category_c": {"type": "integer", "index": 214, "name": "source_last_lead_source_category_c", "comment": null}, "source_last_lead_source_detail_c": {"type": "integer", "index": 215, "name": "source_last_lead_source_detail_c", "comment": null}, "drift_cql_c": {"type": "integer", "index": 216, "name": "drift_cql_c", "comment": null}, "hot_contact_c": {"type": "integer", "index": 217, "name": "hot_contact_c", "comment": null}, "behavioral_score_c": {"type": "integer", "index": 218, "name": "behavioral_score_c", "comment": null}, "unique_email_c": {"type": "integer", "index": 219, "name": "unique_email_c", "comment": null}, "is_emea_event_routing_c": {"type": "integer", "index": 220, "name": "is_emea_event_routing_c", "comment": null}, "csi_code_c": {"type": "integer", "index": 221, "name": "csi_code_c", "comment": null}, "clearbit_role_c": {"type": "integer", "index": 222, "name": "clearbit_role_c", "comment": null}, "clearbit_seniority_c": {"type": "integer", "index": 223, "name": "clearbit_seniority_c", "comment": null}, "clearbit_sub_role_c": {"type": "integer", "index": 224, "name": "clearbit_sub_role_c", "comment": null}, "rh_2_currency_test_c": {"type": "integer", "index": 225, "name": "rh_2_currency_test_c", "comment": null}, "rh_2_describe_c": {"type": "integer", "index": 226, "name": "rh_2_describe_c", "comment": null}, "rh_2_integer_test_c": {"type": "integer", "index": 227, "name": "rh_2_integer_test_c", "comment": null}, "created_by_role_c": {"type": "integer", "index": 228, "name": "created_by_role_c", "comment": null}, "demographic_score_c": {"type": "integer", "index": 229, "name": "demographic_score_c", "comment": null}, "country_code_c": {"type": "integer", "index": 230, "name": "country_code_c", "comment": null}, "state_code_c": {"type": "integer", "index": 231, "name": "state_code_c", "comment": null}, "attended_event_c": {"type": "integer", "index": 232, "name": "attended_event_c", "comment": null}, "zoominfo_technologies_c": {"type": "integer", "index": 233, "name": "zoominfo_technologies_c", "comment": null}, "mql_date_c": {"type": "integer", "index": 234, "name": "mql_date_c", "comment": null}, "user_gems_user_gems_id_c": {"type": "integer", "index": 235, "name": "user_gems_user_gems_id_c", "comment": null}, "dozisf_zoom_info_company_id_c": {"type": "integer", "index": 236, "name": "dozisf_zoom_info_company_id_c", "comment": null}, "dozisf_zoom_info_first_updated_c": {"type": "integer", "index": 237, "name": "dozisf_zoom_info_first_updated_c", "comment": null}, "dozisf_zoom_info_id_c": {"type": "integer", "index": 238, "name": "dozisf_zoom_info_id_c", "comment": null}, "dozisf_zoom_info_last_updated_c": {"type": "integer", "index": 239, "name": "dozisf_zoom_info_last_updated_c", "comment": null}, "lean_data_manual_route_trigger_c": {"type": "integer", "index": 240, "name": "lean_data_manual_route_trigger_c", "comment": null}, "first_mql_date_c": {"type": "integer", "index": 241, "name": "first_mql_date_c", "comment": null}, "active_relationship_c": {"type": "integer", "index": 242, "name": "active_relationship_c", "comment": null}, "clarus_date_c": {"type": "integer", "index": 243, "name": "clarus_date_c", "comment": null}, "clarus_editor_c": {"type": "integer", "index": 244, "name": "clarus_editor_c", "comment": null}, "clarus_notes_c": {"type": "integer", "index": 245, "name": "clarus_notes_c", "comment": null}, "clarus_project_c": {"type": "integer", "index": 246, "name": "clarus_project_c", "comment": null}, "clarus_status_c": {"type": "integer", "index": 247, "name": "clarus_status_c", "comment": null}, "historical_contact_status_c": {"type": "integer", "index": 248, "name": "historical_contact_status_c", "comment": null}, "fivetran_account_association_date_c": {"type": "integer", "index": 249, "name": "fivetran_account_association_date_c", "comment": null}, "fivetran_account_user_role_s_c": {"type": "integer", "index": 250, "name": "fivetran_account_user_role_s_c", "comment": null}, "mql_reason_c": {"type": "integer", "index": 251, "name": "mql_reason_c", "comment": null}, "attempting_contact_date_time_c": {"type": "integer", "index": 252, "name": "attempting_contact_date_time_c", "comment": null}, "linked_in_url_c": {"type": "integer", "index": 253, "name": "linked_in_url_c", "comment": null}, "trial_contact_start_date_c": {"type": "integer", "index": 254, "name": "trial_contact_start_date_c", "comment": null}, "contact_holdover_c": {"type": "integer", "index": 255, "name": "contact_holdover_c", "comment": null}, "bill_to_contact_hidden_c": {"type": "integer", "index": 256, "name": "bill_to_contact_hidden_c", "comment": null}, "enrichment_request_c": {"type": "integer", "index": 257, "name": "enrichment_request_c", "comment": null}, "meta_data_create_date_c": {"type": "integer", "index": 258, "name": "meta_data_create_date_c", "comment": null}, "primary_se_c": {"type": "integer", "index": 259, "name": "primary_se_c", "comment": null}, "unqualified_reason_c": {"type": "integer", "index": 260, "name": "unqualified_reason_c", "comment": null}, "opp_handoff_ae_c": {"type": "integer", "index": 261, "name": "opp_handoff_ae_c", "comment": null}, "marketing_connector_interest_c": {"type": "integer", "index": 262, "name": "marketing_connector_interest_c", "comment": null}, "recent_marketing_campaign_status_c": {"type": "integer", "index": 263, "name": "recent_marketing_campaign_status_c", "comment": null}, "salesloft_cadence_trigger_c": {"type": "integer", "index": 264, "name": "salesloft_cadence_trigger_c", "comment": null}, "last_ae_activity_owner_c": {"type": "integer", "index": 265, "name": "last_ae_activity_owner_c", "comment": null}, "last_bdr_activity_owner_c": {"type": "integer", "index": 266, "name": "last_bdr_activity_owner_c", "comment": null}, "last_manual_ae_activity_date_c": {"type": "integer", "index": 267, "name": "last_manual_ae_activity_date_c", "comment": null}, "last_manual_bdr_activity_date_c": {"type": "integer", "index": 268, "name": "last_manual_bdr_activity_date_c", "comment": null}, "leandata_contact_owner_override_c": {"type": "integer", "index": 269, "name": "leandata_contact_owner_override_c", "comment": null}, "potential_fivetran_use_case_c": {"type": "integer", "index": 270, "name": "potential_fivetran_use_case_c", "comment": null}, "lean_data_router_completion_date_time_c": {"type": "integer", "index": 271, "name": "lean_data_router_completion_date_time_c", "comment": null}, "partner_territory_c": {"type": "integer", "index": 272, "name": "partner_territory_c", "comment": null}, "partner_company_c": {"type": "integer", "index": 273, "name": "partner_company_c", "comment": null}, "bizible_2_ad_campaign_name_ft_c": {"type": "integer", "index": 274, "name": "bizible_2_ad_campaign_name_ft_c", "comment": null}, "bizible_2_ad_campaign_name_lc_c": {"type": "integer", "index": 275, "name": "bizible_2_ad_campaign_name_lc_c", "comment": null}, "bizible_2_bizible_id_c": {"type": "integer", "index": 276, "name": "bizible_2_bizible_id_c", "comment": null}, "bizible_2_landing_page_ft_c": {"type": "integer", "index": 277, "name": "bizible_2_landing_page_ft_c", "comment": null}, "bizible_2_landing_page_lc_c": {"type": "integer", "index": 278, "name": "bizible_2_landing_page_lc_c", "comment": null}, "bizible_2_marketing_channel_ft_c": {"type": "integer", "index": 279, "name": "bizible_2_marketing_channel_ft_c", "comment": null}, "bizible_2_marketing_channel_lc_c": {"type": "integer", "index": 280, "name": "bizible_2_marketing_channel_lc_c", "comment": null}, "bizible_2_touchpoint_date_ft_c": {"type": "integer", "index": 281, "name": "bizible_2_touchpoint_date_ft_c", "comment": null}, "bizible_2_touchpoint_date_lc_c": {"type": "integer", "index": 282, "name": "bizible_2_touchpoint_date_lc_c", "comment": null}, "bizible_2_touchpoint_source_ft_c": {"type": "integer", "index": 283, "name": "bizible_2_touchpoint_source_ft_c", "comment": null}, "bizible_2_touchpoint_source_lc_c": {"type": "integer", "index": 284, "name": "bizible_2_touchpoint_source_lc_c", "comment": null}, "sales_email_opt_out_c": {"type": "integer", "index": 285, "name": "sales_email_opt_out_c", "comment": null}, "sales_email_opt_out_date_time_c": {"type": "integer", "index": 286, "name": "sales_email_opt_out_date_time_c", "comment": null}, "celigo_sfnsio_net_suite_id_c": {"type": "integer", "index": 287, "name": "celigo_sfnsio_net_suite_id_c", "comment": null}, "celigo_sfnsio_net_suite_record_c": {"type": "integer", "index": 288, "name": "celigo_sfnsio_net_suite_record_c", "comment": null}, "celigo_sfnsio_net_suite_sync_error_c": {"type": "integer", "index": 289, "name": "celigo_sfnsio_net_suite_sync_error_c", "comment": null}, "celigo_sfnsio_skip_export_to_net_suite_c": {"type": "integer", "index": 290, "name": "celigo_sfnsio_skip_export_to_net_suite_c", "comment": null}, "celigo_sfnsio_test_mode_record_c": {"type": "integer", "index": 291, "name": "celigo_sfnsio_test_mode_record_c", "comment": null}, "ironclad_workflow_c": {"type": "integer", "index": 292, "name": "ironclad_workflow_c", "comment": null}, "last_sales_activity_date_time_c": {"type": "integer", "index": 293, "name": "last_sales_activity_date_time_c", "comment": null}, "user_activity_logged_by_c": {"type": "integer", "index": 294, "name": "user_activity_logged_by_c", "comment": null}, "first_activity_after_mql_date_c": {"type": "integer", "index": 295, "name": "first_activity_after_mql_date_c", "comment": null}, "last_sdr_activity_owner_c": {"type": "integer", "index": 296, "name": "last_sdr_activity_owner_c", "comment": null}, "last_sdr_activity_date_c": {"type": "integer", "index": 297, "name": "last_sdr_activity_date_c", "comment": null}, "beta_connector_interest_c": {"type": "integer", "index": 298, "name": "beta_connector_interest_c", "comment": null}, "first_manual_activity_after_mql_date_c": {"type": "integer", "index": 299, "name": "first_manual_activity_after_mql_date_c", "comment": null}, "user_gems_ug_past_infos_c": {"type": "integer", "index": 300, "name": "user_gems_ug_past_infos_c", "comment": null}, "user_gems_ug_current_infos_c": {"type": "integer", "index": 301, "name": "user_gems_ug_current_infos_c", "comment": null}, "user_gems_ug_created_by_ug_c": {"type": "integer", "index": 302, "name": "user_gems_ug_created_by_ug_c", "comment": null}, "free_trial_email_confirmed_date_c": {"type": "integer", "index": 303, "name": "free_trial_email_confirmed_date_c", "comment": null}, "routed_from_manual_bdr_ae_activity_c": {"type": "integer", "index": 304, "name": "routed_from_manual_bdr_ae_activity_c", "comment": null}, "dnboptimizer_dn_bcontact_record_c": {"type": "integer", "index": 305, "name": "dnboptimizer_dn_bcontact_record_c", "comment": null}, "i_sell_avention_id_c": {"type": "integer", "index": 306, "name": "i_sell_avention_id_c", "comment": null}, "persona_c": {"type": "integer", "index": 307, "name": "persona_c", "comment": null}, "last_marketing_interesting_moment_date_c": {"type": "integer", "index": 308, "name": "last_marketing_interesting_moment_date_c", "comment": null}, "verified_c": {"type": "integer", "index": 309, "name": "verified_c", "comment": null}, "salesloft_owner_c": {"type": "integer", "index": 310, "name": "salesloft_owner_c", "comment": null}, "salesloft_owner_sf_c": {"type": "integer", "index": 311, "name": "salesloft_owner_sf_c", "comment": null}, "email_opt_out_date_time_c": {"type": "integer", "index": 312, "name": "email_opt_out_date_time_c", "comment": null}, "pbf_startup_primary_role_c": {"type": "integer", "index": 313, "name": "pbf_startup_primary_role_c", "comment": null}, "pbf_startup_certify_eligibility_c": {"type": "integer", "index": 314, "name": "pbf_startup_certify_eligibility_c", "comment": null}, "engagio_intent_minutes_last_30_days_c": {"type": "integer", "index": 315, "name": "engagio_intent_minutes_last_30_days_c", "comment": null}, "engagio_engagement_minutes_last_3_months_c": {"type": "integer", "index": 316, "name": "engagio_engagement_minutes_last_3_months_c", "comment": null}, "engagio_engagement_minutes_last_7_days_c": {"type": "integer", "index": 317, "name": "engagio_engagement_minutes_last_7_days_c", "comment": null}, "engagio_first_engagement_date_c": {"type": "integer", "index": 318, "name": "engagio_first_engagement_date_c", "comment": null}, "engagio_department_c": {"type": "integer", "index": 319, "name": "engagio_department_c", "comment": null}, "engagio_role_c": {"type": "integer", "index": 320, "name": "engagio_role_c", "comment": null}, "mql_date_changed_c": {"type": "integer", "index": 321, "name": "mql_date_changed_c", "comment": null}, "first_activity_after_mql_changed_c": {"type": "integer", "index": 322, "name": "first_activity_after_mql_changed_c", "comment": null}, "birthdate": {"type": "timestamp without time zone", "index": 323, "name": "birthdate", "comment": null}, "legacy_hvr_id_c": {"type": "integer", "index": 324, "name": "legacy_hvr_id_c", "comment": null}, "has_opted_out_of_fax": {"type": "integer", "index": 325, "name": "has_opted_out_of_fax", "comment": null}, "other_latitude": {"type": "integer", "index": 326, "name": "other_latitude", "comment": null}, "username_c": {"type": "integer", "index": 327, "name": "username_c", "comment": null}, "assistant_name": {"type": "integer", "index": 328, "name": "assistant_name", "comment": null}, "created_at_c": {"type": "integer", "index": 329, "name": "created_at_c", "comment": null}, "partner_contact_deprecate_c": {"type": "integer", "index": 330, "name": "partner_contact_deprecate_c", "comment": null}, "other_street": {"type": "integer", "index": 331, "name": "other_street", "comment": null}, "other_state": {"type": "integer", "index": 332, "name": "other_state", "comment": null}, "home_phone": {"type": "integer", "index": 333, "name": "home_phone", "comment": null}, "other_city": {"type": "integer", "index": 334, "name": "other_city", "comment": null}, "company_c": {"type": "integer", "index": 335, "name": "company_c", "comment": null}, "opportunity_c": {"type": "integer", "index": 336, "name": "opportunity_c", "comment": null}, "hvr_update_c": {"type": "integer", "index": 337, "name": "hvr_update_c", "comment": null}, "other_phone": {"type": "integer", "index": 338, "name": "other_phone", "comment": null}, "other_geocode_accuracy": {"type": "integer", "index": 339, "name": "other_geocode_accuracy", "comment": null}, "other_postal_code": {"type": "integer", "index": 340, "name": "other_postal_code", "comment": null}, "other_country": {"type": "integer", "index": 341, "name": "other_country", "comment": null}, "assistant_phone": {"type": "integer", "index": 342, "name": "assistant_phone", "comment": null}, "jigsaw": {"type": "integer", "index": 343, "name": "jigsaw", "comment": null}, "avatar_c": {"type": "integer", "index": 344, "name": "avatar_c", "comment": null}, "other_longitude": {"type": "integer", "index": 345, "name": "other_longitude", "comment": null}, "lean_data_status_info_c": {"type": "integer", "index": 346, "name": "lean_data_status_info_c", "comment": null}, "analytics_id_c": {"type": "integer", "index": 347, "name": "analytics_id_c", "comment": null}, "dnb_primary_address_postal_code_c": {"type": "integer", "index": 348, "name": "dnb_primary_address_postal_code_c", "comment": null}, "dnb_contact_phone_c": {"type": "integer", "index": 349, "name": "dnb_contact_phone_c", "comment": null}, "dnb_email_deliverability_score_c": {"type": "integer", "index": 350, "name": "dnb_email_deliverability_score_c", "comment": null}, "dnb_job_title_c": {"type": "integer", "index": 351, "name": "dnb_job_title_c", "comment": null}, "dnb_email_c": {"type": "integer", "index": 352, "name": "dnb_email_c", "comment": null}, "dnb_primary_address_city_c": {"type": "integer", "index": 353, "name": "dnb_primary_address_city_c", "comment": null}, "dnb_phone_accuracy_score_c": {"type": "integer", "index": 354, "name": "dnb_phone_accuracy_score_c", "comment": null}, "dnb_primary_address_state_province_c": {"type": "integer", "index": 355, "name": "dnb_primary_address_state_province_c", "comment": null}, "dnb_primary_address_state_province_abbre_c": {"type": "integer", "index": 356, "name": "dnb_primary_address_state_province_abbre_c", "comment": null}, "dnb_primary_address_country_region_code_c": {"type": "integer", "index": 357, "name": "dnb_primary_address_country_region_code_c", "comment": null}, "email_opt_in_double_c": {"type": "integer", "index": 358, "name": "email_opt_in_double_c", "comment": null}, "phone_number_catch_all_c": {"type": "integer", "index": 359, "name": "phone_number_catch_all_c", "comment": null}, "contact_owners_manager_stamped_c": {"type": "integer", "index": 360, "name": "contact_owners_manager_stamped_c", "comment": null}, "fivetran_account_id_c": {"type": "integer", "index": 361, "name": "fivetran_account_id_c", "comment": null}, "contacts_domain_exists_c": {"type": "integer", "index": 362, "name": "contacts_domain_exists_c", "comment": null}, "utm_id_c": {"type": "integer", "index": 363, "name": "utm_id_c", "comment": null}, "self_service_routing_c": {"type": "integer", "index": 364, "name": "self_service_routing_c", "comment": null}, "no_geo_data_c": {"type": "integer", "index": 365, "name": "no_geo_data_c", "comment": null}, "to_be_deleted_salesloft_backfill_c": {"type": "integer", "index": 366, "name": "to_be_deleted_salesloft_backfill_c", "comment": null}, "do_not_sync_reason_marketo_c": {"type": "integer", "index": 367, "name": "do_not_sync_reason_marketo_c", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 368, "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.salesforce_source_integration_tests.sf_contact_data"}, "seed.salesforce_source_integration_tests.sf_contact_history_data": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_contact_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_active": {"type": "boolean", "index": 1, "name": "_fivetran_active", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_end", "comment": null}, "id": {"type": "text", "index": 4, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 6, "name": "account_id", "comment": null}, "email": {"type": "text", "index": 7, "name": "email", "comment": null}, "first_name": {"type": "text", "index": 8, "name": "first_name", "comment": null}, "is_deleted": {"type": "boolean", "index": 9, "name": "is_deleted", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 10, "name": "last_activity_date", "comment": null}, "last_modified_by_id": {"type": "text", "index": 11, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 12, "name": "last_modified_date", "comment": null}, "last_name": {"type": "text", "index": 13, "name": "last_name", "comment": null}, "last_referenced_date": {"type": "integer", "index": 14, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 15, "name": "last_viewed_date", "comment": null}, "mailing_city": {"type": "text", "index": 16, "name": "mailing_city", "comment": null}, "mailing_country": {"type": "text", "index": 17, "name": "mailing_country", "comment": null}, "mailing_country_code": {"type": "text", "index": 18, "name": "mailing_country_code", "comment": null}, "mailing_postal_code": {"type": "integer", "index": 19, "name": "mailing_postal_code", "comment": null}, "mailing_state": {"type": "text", "index": 20, "name": "mailing_state", "comment": null}, "mailing_street": {"type": "text", "index": 21, "name": "mailing_street", "comment": null}, "master_record_id": {"type": "integer", "index": 22, "name": "master_record_id", "comment": null}, "mobile_phone": {"type": "integer", "index": 23, "name": "mobile_phone", "comment": null}, "name": {"type": "text", "index": 24, "name": "name", "comment": null}, "owner_id": {"type": "text", "index": 25, "name": "owner_id", "comment": null}, "phone": {"type": "text", "index": 26, "name": "phone", "comment": null}, "reports_to_id": {"type": "integer", "index": 27, "name": "reports_to_id", "comment": null}, "title": {"type": "text", "index": 28, "name": "title", "comment": null}, "lead_source": {"type": "text", "index": 29, "name": "lead_source", "comment": null}, "description": {"type": "text", "index": 30, "name": "description", "comment": null}, "individual_id": {"type": "integer", "index": 31, "name": "individual_id", "comment": null}, "home_phone": {"type": "integer", "index": 32, "name": "home_phone", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.salesforce_source_integration_tests.sf_contact_history_data"}, "seed.salesforce_source_integration_tests.sf_event_data": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_event_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "activity_date": {"type": "timestamp without time zone", "index": 4, "name": "activity_date", "comment": null}, "activity_date_time": {"type": "timestamp without time zone", "index": 5, "name": "activity_date_time", "comment": null}, "created_by_id": {"type": "text", "index": 6, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 7, "name": "created_date", "comment": null}, "description": {"type": "text", "index": 8, "name": "description", "comment": null}, "duration_in_minutes": {"type": "integer", "index": 9, "name": "duration_in_minutes", "comment": null}, "end_date_time": {"type": "timestamp without time zone", "index": 10, "name": "end_date_time", "comment": null}, "event_subtype": {"type": "text", "index": 11, "name": "event_subtype", "comment": null}, "group_event_type": {"type": "integer", "index": 12, "name": "group_event_type", "comment": null}, "invitee_uuid_c": {"type": "integer", "index": 13, "name": "invitee_uuid_c", "comment": null}, "is_child": {"type": "boolean", "index": 14, "name": "is_child", "comment": null}, "is_deleted": {"type": "boolean", "index": 15, "name": "is_deleted", "comment": null}, "is_group_event": {"type": "boolean", "index": 16, "name": "is_group_event", "comment": null}, "is_private": {"type": "boolean", "index": 17, "name": "is_private", "comment": null}, "is_recurrence": {"type": "boolean", "index": 18, "name": "is_recurrence", "comment": null}, "is_reminder_set": {"type": "boolean", "index": 19, "name": "is_reminder_set", "comment": null}, "last_modified_by_id": {"type": "text", "index": 20, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 21, "name": "last_modified_date", "comment": null}, "location": {"type": "integer", "index": 22, "name": "location", "comment": null}, "no_show_c": {"type": "boolean", "index": 23, "name": "no_show_c", "comment": null}, "owner_id": {"type": "text", "index": 24, "name": "owner_id", "comment": null}, "recurrence_activity_id": {"type": "integer", "index": 25, "name": "recurrence_activity_id", "comment": null}, "recurrence_day_of_month": {"type": "integer", "index": 26, "name": "recurrence_day_of_month", "comment": null}, "recurrence_day_of_week_mask": {"type": "integer", "index": 27, "name": "recurrence_day_of_week_mask", "comment": null}, "recurrence_end_date_only": {"type": "timestamp without time zone", "index": 28, "name": "recurrence_end_date_only", "comment": null}, "recurrence_instance": {"type": "integer", "index": 29, "name": "recurrence_instance", "comment": null}, "recurrence_interval": {"type": "integer", "index": 30, "name": "recurrence_interval", "comment": null}, "recurrence_month_of_year": {"type": "integer", "index": 31, "name": "recurrence_month_of_year", "comment": null}, "recurrence_start_date_time": {"type": "timestamp without time zone", "index": 32, "name": "recurrence_start_date_time", "comment": null}, "recurrence_time_zone_sid_key": {"type": "integer", "index": 33, "name": "recurrence_time_zone_sid_key", "comment": null}, "recurrence_type": {"type": "integer", "index": 34, "name": "recurrence_type", "comment": null}, "referral_account_c": {"type": "integer", "index": 35, "name": "referral_account_c", "comment": null}, "referral_contact_c": {"type": "integer", "index": 36, "name": "referral_contact_c", "comment": null}, "reminder_date_time": {"type": "timestamp without time zone", "index": 37, "name": "reminder_date_time", "comment": null}, "show_as": {"type": "text", "index": 38, "name": "show_as", "comment": null}, "start_date_time": {"type": "timestamp without time zone", "index": 39, "name": "start_date_time", "comment": null}, "subject": {"type": "text", "index": 40, "name": "subject", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 41, "name": "system_modstamp", "comment": null}, "type": {"type": "text", "index": 42, "name": "type", "comment": null}, "what_count": {"type": "integer", "index": 43, "name": "what_count", "comment": null}, "what_id": {"type": "text", "index": 44, "name": "what_id", "comment": null}, "who_count": {"type": "integer", "index": 45, "name": "who_count", "comment": null}, "who_id": {"type": "text", "index": 46, "name": "who_id", "comment": null}, "first_meeting_held_c": {"type": "integer", "index": 47, "name": "first_meeting_held_c", "comment": null}, "associated_sdr_c": {"type": "integer", "index": 48, "name": "associated_sdr_c", "comment": null}, "first_meeting_c": {"type": "integer", "index": 49, "name": "first_meeting_c", "comment": null}, "call_recording_c": {"type": "integer", "index": 50, "name": "call_recording_c", "comment": null}, "affectlayer_chorus_call_id_c": {"type": "integer", "index": 51, "name": "affectlayer_chorus_call_id_c", "comment": null}, "affectlayer_affect_layer_call_id_c": {"type": "integer", "index": 52, "name": "affectlayer_affect_layer_call_id_c", "comment": null}, "last_rep_activity_date_c": {"type": "integer", "index": 53, "name": "last_rep_activity_date_c", "comment": null}, "lid_url_c": {"type": "integer", "index": 54, "name": "lid_url_c", "comment": null}, "lid_date_sent_c": {"type": "integer", "index": 55, "name": "lid_date_sent_c", "comment": null}, "sales_loft_step_id_c": {"type": "integer", "index": 56, "name": "sales_loft_step_id_c", "comment": null}, "sales_loft_step_name_c": {"type": "integer", "index": 57, "name": "sales_loft_step_name_c", "comment": null}, "sales_loft_step_type_c": {"type": "integer", "index": 58, "name": "sales_loft_step_type_c", "comment": null}, "sales_loft_email_template_id_c": {"type": "integer", "index": 59, "name": "sales_loft_email_template_id_c", "comment": null}, "sales_loft_external_identifier_c": {"type": "integer", "index": 60, "name": "sales_loft_external_identifier_c", "comment": null}, "sales_loft_cadence_id_c": {"type": "integer", "index": 61, "name": "sales_loft_cadence_id_c", "comment": null}, "sales_loft_clicked_count_c": {"type": "integer", "index": 62, "name": "sales_loft_clicked_count_c", "comment": null}, "sales_loft_cadence_name_c": {"type": "integer", "index": 63, "name": "sales_loft_cadence_name_c", "comment": null}, "sales_loft_reply_count_c": {"type": "integer", "index": 64, "name": "sales_loft_reply_count_c", "comment": null}, "call_disposition_c": {"type": "integer", "index": 65, "name": "call_disposition_c", "comment": null}, "sales_loft_email_template_title_c": {"type": "integer", "index": 66, "name": "sales_loft_email_template_title_c", "comment": null}, "sales_loft_step_day_new_c": {"type": "integer", "index": 67, "name": "sales_loft_step_day_new_c", "comment": null}, "call_disposition_2_c": {"type": "integer", "index": 68, "name": "call_disposition_2_c", "comment": null}, "sales_loft_viewed_count_c": {"type": "integer", "index": 69, "name": "sales_loft_viewed_count_c", "comment": null}, "sales_loft_1_sales_loft_step_day_c": {"type": "integer", "index": 70, "name": "sales_loft_1_sales_loft_step_day_c", "comment": null}, "sales_loft_1_sales_loft_clicked_count_c": {"type": "integer", "index": 71, "name": "sales_loft_1_sales_loft_clicked_count_c", "comment": null}, "sales_loft_1_sales_loft_view_count_c": {"type": "integer", "index": 72, "name": "sales_loft_1_sales_loft_view_count_c", "comment": null}, "sales_loft_1_call_disposition_c": {"type": "integer", "index": 73, "name": "sales_loft_1_call_disposition_c", "comment": null}, "sales_loft_1_sales_loft_replies_count_c": {"type": "integer", "index": 74, "name": "sales_loft_1_sales_loft_replies_count_c", "comment": null}, "sales_loft_1_sales_loft_cadence_name_c": {"type": "integer", "index": 75, "name": "sales_loft_1_sales_loft_cadence_name_c", "comment": null}, "sales_loft_1_call_sentiment_c": {"type": "integer", "index": 76, "name": "sales_loft_1_call_sentiment_c", "comment": null}, "sales_loft_1_sales_loft_email_template_title_c": {"type": "integer", "index": 77, "name": "sales_loft_1_sales_loft_email_template_title_c", "comment": null}, "is_recurrence_2": {"type": "boolean", "index": 78, "name": "is_recurrence_2", "comment": null}, "is_recurrence_2_exception": {"type": "boolean", "index": 79, "name": "is_recurrence_2_exception", "comment": null}, "is_recurrence_2_exclusion": {"type": "boolean", "index": 80, "name": "is_recurrence_2_exclusion", "comment": null}, "recurrence_2_pattern_start_date": {"type": "timestamp without time zone", "index": 81, "name": "recurrence_2_pattern_start_date", "comment": null}, "recurrence_2_pattern_text": {"type": "integer", "index": 82, "name": "recurrence_2_pattern_text", "comment": null}, "recurrence_2_pattern_time_zone": {"type": "integer", "index": 83, "name": "recurrence_2_pattern_time_zone", "comment": null}, "recurrence_2_pattern_version": {"type": "integer", "index": 84, "name": "recurrence_2_pattern_version", "comment": null}, "co_selling_activity_c": {"type": "integer", "index": 85, "name": "co_selling_activity_c", "comment": null}, "is_a_co_sell_activity_c": {"type": "integer", "index": 86, "name": "is_a_co_sell_activity_c", "comment": null}, "partner_contact_c": {"type": "integer", "index": 87, "name": "partner_contact_c", "comment": null}, "description_c": {"type": "integer", "index": 88, "name": "description_c", "comment": null}, "campaign_c": {"type": "integer", "index": 89, "name": "campaign_c", "comment": null}, "event_name_c": {"type": "integer", "index": 90, "name": "event_name_c", "comment": null}, "partner_account_c": {"type": "integer", "index": 91, "name": "partner_account_c", "comment": null}, "topic_c": {"type": "integer", "index": 92, "name": "topic_c", "comment": null}, "attendance_number_c": {"type": "integer", "index": 93, "name": "attendance_number_c", "comment": null}, "partner_activity_type_c": {"type": "integer", "index": 94, "name": "partner_activity_type_c", "comment": null}, "how_did_you_bring_value_or_create_trust_c": {"type": "integer", "index": 95, "name": "how_did_you_bring_value_or_create_trust_c", "comment": null}, "proof_of_referral_c": {"type": "integer", "index": 96, "name": "proof_of_referral_c", "comment": null}, "how_did_you_bring_value_or_earn_trust_c": {"type": "integer", "index": 97, "name": "how_did_you_bring_value_or_earn_trust_c", "comment": null}, "duration_in_minutes_c": {"type": "integer", "index": 98, "name": "duration_in_minutes_c", "comment": null}, "vidyard_c": {"type": "boolean", "index": 99, "name": "vidyard_c", "comment": null}, "collections_hold_c": {"type": "boolean", "index": 100, "name": "collections_hold_c", "comment": null}, "execute_collections_plan_activity_c": {"type": "boolean", "index": 101, "name": "execute_collections_plan_activity_c", "comment": null}, "expected_payment_date_c": {"type": "integer", "index": 102, "name": "expected_payment_date_c", "comment": null}, "end_date": {"type": "timestamp without time zone", "index": 103, "name": "end_date", "comment": null}, "opportunity_c": {"type": "integer", "index": 104, "name": "opportunity_c", "comment": null}, "meeting_type_c": {"type": "integer", "index": 105, "name": "meeting_type_c", "comment": null}, "meeting_name_c": {"type": "integer", "index": 106, "name": "meeting_name_c", "comment": null}, "bizible_2_bizible_id_c": {"type": "integer", "index": 107, "name": "bizible_2_bizible_id_c", "comment": null}, "bizible_2_bizible_touchpoint_date_c": {"type": "integer", "index": 108, "name": "bizible_2_bizible_touchpoint_date_c", "comment": null}, "assigned_to_role_c": {"type": "integer", "index": 109, "name": "assigned_to_role_c", "comment": null}, "assigned_to_name_c": {"type": "integer", "index": 110, "name": "assigned_to_name_c", "comment": null}, "legacy_hvr_id_c": {"type": "integer", "index": 111, "name": "legacy_hvr_id_c", "comment": null}, "is_archived": {"type": "boolean", "index": 112, "name": "is_archived", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 113, "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.salesforce_source_integration_tests.sf_event_data"}, "seed.salesforce_source_integration_tests.sf_lead_data": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_lead_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"country": {"type": "integer", "index": 1, "name": "country", "comment": null}, "email_bounced_reason": {"type": "integer", "index": 2, "name": "email_bounced_reason", "comment": null}, "email_bounced_date": {"type": "timestamp without time zone", "index": 3, "name": "email_bounced_date", "comment": null}, "owner_id": {"type": "text", "index": 4, "name": "owner_id", "comment": null}, "lead_source": {"type": "integer", "index": 5, "name": "lead_source", "comment": null}, "converted_date": {"type": "timestamp without time zone", "index": 6, "name": "converted_date", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 7, "name": "last_modified_date", "comment": null}, "master_record_id": {"type": "integer", "index": 8, "name": "master_record_id", "comment": null}, "last_modified_by_id": {"type": "text", "index": 9, "name": "last_modified_by_id", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 10, "name": "system_modstamp", "comment": null}, "geocode_accuracy": {"type": "integer", "index": 11, "name": "geocode_accuracy", "comment": null}, "converted_contact_id": {"type": "text", "index": 12, "name": "converted_contact_id", "comment": null}, "id": {"type": "text", "index": 13, "name": "id", "comment": null}, "photo_url": {"type": "text", "index": 14, "name": "photo_url", "comment": null}, "state": {"type": "integer", "index": 15, "name": "state", "comment": null}, "longitude": {"type": "integer", "index": 16, "name": "longitude", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 17, "name": "last_referenced_date", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 18, "name": "last_activity_date", "comment": null}, "country_code": {"type": "integer", "index": 19, "name": "country_code", "comment": null}, "phone": {"type": "integer", "index": 20, "name": "phone", "comment": null}, "name": {"type": "text", "index": 21, "name": "name", "comment": null}, "jigsaw_contact_id": {"type": "integer", "index": 22, "name": "jigsaw_contact_id", "comment": null}, "created_by_id": {"type": "text", "index": 23, "name": "created_by_id", "comment": null}, "salutation": {"type": "integer", "index": 24, "name": "salutation", "comment": null}, "is_converted": {"type": "boolean", "index": 25, "name": "is_converted", "comment": null}, "state_code": {"type": "integer", "index": 26, "name": "state_code", "comment": null}, "is_unread_by_owner": {"type": "boolean", "index": 27, "name": "is_unread_by_owner", "comment": null}, "status": {"type": "text", "index": 28, "name": "status", "comment": null}, "city": {"type": "integer", "index": 29, "name": "city", "comment": null}, "latitude": {"type": "integer", "index": 30, "name": "latitude", "comment": null}, "cbit_clearbit_c": {"type": "integer", "index": 31, "name": "cbit_clearbit_c", "comment": null}, "industry": {"type": "text", "index": 32, "name": "industry", "comment": null}, "title": {"type": "integer", "index": 33, "name": "title", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 34, "name": "_fivetran_synced", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 35, "name": "last_viewed_date", "comment": null}, "converted_opportunity_id": {"type": "integer", "index": 36, "name": "converted_opportunity_id", "comment": null}, "is_deleted": {"type": "boolean", "index": 37, "name": "is_deleted", "comment": null}, "street": {"type": "integer", "index": 38, "name": "street", "comment": null}, "company": {"type": "text", "index": 39, "name": "company", "comment": null}, "first_name": {"type": "text", "index": 40, "name": "first_name", "comment": null}, "email": {"type": "text", "index": 41, "name": "email", "comment": null}, "website": {"type": "integer", "index": 42, "name": "website", "comment": null}, "last_name": {"type": "text", "index": 43, "name": "last_name", "comment": null}, "number_of_employees": {"type": "integer", "index": 44, "name": "number_of_employees", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 45, "name": "created_date", "comment": null}, "active_in_sequence_c": {"type": "boolean", "index": 46, "name": "active_in_sequence_c", "comment": null}, "postal_code": {"type": "integer", "index": 47, "name": "postal_code", "comment": null}, "has_opted_out_of_email": {"type": "boolean", "index": 48, "name": "has_opted_out_of_email", "comment": null}, "converted_account_id": {"type": "text", "index": 49, "name": "converted_account_id", "comment": null}, "mobile_phone": {"type": "integer", "index": 50, "name": "mobile_phone", "comment": null}, "annual_revenue": {"type": "integer", "index": 51, "name": "annual_revenue", "comment": null}, "description": {"type": "integer", "index": 52, "name": "description", "comment": null}, "fax": {"type": "integer", "index": 53, "name": "fax", "comment": null}, "lean_data_marketing_sys_created_date_c": {"type": "integer", "index": 54, "name": "lean_data_marketing_sys_created_date_c", "comment": null}, "individual_id": {"type": "integer", "index": 55, "name": "individual_id", "comment": null}, "source_every_lead_source_detail_c": {"type": "integer", "index": 56, "name": "source_every_lead_source_detail_c", "comment": null}, "source_first_lead_source_detail_c": {"type": "integer", "index": 57, "name": "source_first_lead_source_detail_c", "comment": null}, "leandata_contact_owner_override_c": {"type": "integer", "index": 58, "name": "leandata_contact_owner_override_c", "comment": null}, "potential_fivetran_use_case_c": {"type": "text", "index": 59, "name": "potential_fivetran_use_case_c", "comment": null}, "bizible_2_account_c": {"type": "integer", "index": 60, "name": "bizible_2_account_c", "comment": null}, "bizible_2_ad_campaign_name_ft_c": {"type": "integer", "index": 61, "name": "bizible_2_ad_campaign_name_ft_c", "comment": null}, "bizible_2_ad_campaign_name_lc_c": {"type": "integer", "index": 62, "name": "bizible_2_ad_campaign_name_lc_c", "comment": null}, "bizible_2_bizible_id_c": {"type": "integer", "index": 63, "name": "bizible_2_bizible_id_c", "comment": null}, "bizible_2_landing_page_ft_c": {"type": "integer", "index": 64, "name": "bizible_2_landing_page_ft_c", "comment": null}, "bizible_2_landing_page_lc_c": {"type": "integer", "index": 65, "name": "bizible_2_landing_page_lc_c", "comment": null}, "bizible_2_marketing_channel_ft_c": {"type": "integer", "index": 66, "name": "bizible_2_marketing_channel_ft_c", "comment": null}, "bizible_2_marketing_channel_lc_c": {"type": "integer", "index": 67, "name": "bizible_2_marketing_channel_lc_c", "comment": null}, "bizible_2_touchpoint_date_ft_c": {"type": "integer", "index": 68, "name": "bizible_2_touchpoint_date_ft_c", "comment": null}, "bizible_2_touchpoint_date_lc_c": {"type": "integer", "index": 69, "name": "bizible_2_touchpoint_date_lc_c", "comment": null}, "bizible_2_touchpoint_source_ft_c": {"type": "integer", "index": 70, "name": "bizible_2_touchpoint_source_ft_c", "comment": null}, "bizible_2_touchpoint_source_lc_c": {"type": "integer", "index": 71, "name": "bizible_2_touchpoint_source_lc_c", "comment": null}, "sales_email_opt_out_c": {"type": "boolean", "index": 72, "name": "sales_email_opt_out_c", "comment": null}, "sales_email_opt_out_date_time_c": {"type": "integer", "index": 73, "name": "sales_email_opt_out_date_time_c", "comment": null}, "bombora_app_bombora_surge_record_count_c": {"type": "integer", "index": 74, "name": "bombora_app_bombora_surge_record_count_c", "comment": null}, "bombora_app_bombora_last_date_time_updated_c": {"type": "integer", "index": 75, "name": "bombora_app_bombora_last_date_time_updated_c", "comment": null}, "bombora_app_bombora_total_composite_score_c": {"type": "integer", "index": 76, "name": "bombora_app_bombora_total_composite_score_c", "comment": null}, "linked_in_url_c": {"type": "integer", "index": 77, "name": "linked_in_url_c", "comment": null}, "beta_connector_interest_c": {"type": "integer", "index": 78, "name": "beta_connector_interest_c", "comment": null}, "user_gems_ug_past_infos_c": {"type": "integer", "index": 79, "name": "user_gems_ug_past_infos_c", "comment": null}, "user_gems_ug_current_infos_c": {"type": "integer", "index": 80, "name": "user_gems_ug_current_infos_c", "comment": null}, "user_gems_ug_created_by_ug_c": {"type": "boolean", "index": 81, "name": "user_gems_ug_created_by_ug_c", "comment": null}, "free_trial_email_confirmed_date_c": {"type": "integer", "index": 82, "name": "free_trial_email_confirmed_date_c", "comment": null}, "dnboptimizer_dn_bcontact_record_c": {"type": "integer", "index": 83, "name": "dnboptimizer_dn_bcontact_record_c", "comment": null}, "dnboptimizer_dn_bcompany_record_c": {"type": "integer", "index": 84, "name": "dnboptimizer_dn_bcompany_record_c", "comment": null}, "dnboptimizer_dnb_d_u_n_s_number_c": {"type": "integer", "index": 85, "name": "dnboptimizer_dnb_d_u_n_s_number_c", "comment": null}, "i_sell_oskey_id_c": {"type": "integer", "index": 86, "name": "i_sell_oskey_id_c", "comment": null}, "verified_c": {"type": "boolean", "index": 87, "name": "verified_c", "comment": null}, "email_opt_out_date_time_c": {"type": "integer", "index": 88, "name": "email_opt_out_date_time_c", "comment": null}, "pbf_startup_c": {"type": "integer", "index": 89, "name": "pbf_startup_c", "comment": null}, "pbf_startup_certify_eligibility_c": {"type": "boolean", "index": 90, "name": "pbf_startup_certify_eligibility_c", "comment": null}, "engagio_intent_minutes_last_30_days_c": {"type": "integer", "index": 91, "name": "engagio_intent_minutes_last_30_days_c", "comment": null}, "engagio_engagement_minutes_last_3_months_c": {"type": "integer", "index": 92, "name": "engagio_engagement_minutes_last_3_months_c", "comment": null}, "engagio_engagement_minutes_last_7_days_c": {"type": "integer", "index": 93, "name": "engagio_engagement_minutes_last_7_days_c", "comment": null}, "engagio_matched_account_c": {"type": "integer", "index": 94, "name": "engagio_matched_account_c", "comment": null}, "engagio_first_engagement_date_c": {"type": "integer", "index": 95, "name": "engagio_first_engagement_date_c", "comment": null}, "engagio_match_time_c": {"type": "integer", "index": 96, "name": "engagio_match_time_c", "comment": null}, "engagio_department_c": {"type": "integer", "index": 97, "name": "engagio_department_c", "comment": null}, "engagio_role_c": {"type": "integer", "index": 98, "name": "engagio_role_c", "comment": null}, "legacy_hvr_id_c": {"type": "integer", "index": 99, "name": "legacy_hvr_id_c", "comment": null}, "hvr_channel_c": {"type": "integer", "index": 100, "name": "hvr_channel_c", "comment": null}, "email_opt_in_double_c": {"type": "boolean", "index": 101, "name": "email_opt_in_double_c", "comment": null}, "phone_number_catch_all_c": {"type": "integer", "index": 102, "name": "phone_number_catch_all_c", "comment": null}, "contacts_domain_exists_c": {"type": "integer", "index": 103, "name": "contacts_domain_exists_c", "comment": null}, "utm_id_c": {"type": "integer", "index": 104, "name": "utm_id_c", "comment": null}, "source_every_utm_id_c": {"type": "integer", "index": 105, "name": "source_every_utm_id_c", "comment": null}, "source_last_utm_id_c": {"type": "integer", "index": 106, "name": "source_last_utm_id_c", "comment": null}, "source_first_utm_id_c": {"type": "integer", "index": 107, "name": "source_first_utm_id_c", "comment": null}, "do_not_sync_reason_marketo_c": {"type": "integer", "index": 108, "name": "do_not_sync_reason_marketo_c", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 109, "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.salesforce_source_integration_tests.sf_lead_data"}, "seed.salesforce_source_integration_tests.sf_opportunity_data": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_opportunity_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "amount": {"type": "double precision", "index": 3, "name": "amount", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "close_date": {"type": "timestamp without time zone", "index": 5, "name": "close_date", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 6, "name": "created_date", "comment": null}, "description": {"type": "integer", "index": 7, "name": "description", "comment": null}, "expected_revenue": {"type": "integer", "index": 8, "name": "expected_revenue", "comment": null}, "fiscal": {"type": "text", "index": 9, "name": "fiscal", "comment": null}, "fiscal_quarter": {"type": "integer", "index": 10, "name": "fiscal_quarter", "comment": null}, "fiscal_year": {"type": "integer", "index": 11, "name": "fiscal_year", "comment": null}, "forecast_category": {"type": "text", "index": 12, "name": "forecast_category", "comment": null}, "forecast_category_name": {"type": "text", "index": 13, "name": "forecast_category_name", "comment": null}, "has_open_activity": {"type": "boolean", "index": 14, "name": "has_open_activity", "comment": null}, "has_opportunity_line_item": {"type": "boolean", "index": 15, "name": "has_opportunity_line_item", "comment": null}, "has_overdue_task": {"type": "boolean", "index": 16, "name": "has_overdue_task", "comment": null}, "id": {"type": "text", "index": 17, "name": "id", "comment": null}, "is_closed": {"type": "boolean", "index": 18, "name": "is_closed", "comment": null}, "is_deleted": {"type": "boolean", "index": 19, "name": "is_deleted", "comment": null}, "is_excluded_from_territory_2_filter": {"type": "integer", "index": 20, "name": "is_excluded_from_territory_2_filter", "comment": null}, "is_won": {"type": "boolean", "index": 21, "name": "is_won", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 22, "name": "last_activity_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 23, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 24, "name": "last_viewed_date", "comment": null}, "lead_source": {"type": "text", "index": 25, "name": "lead_source", "comment": null}, "name": {"type": "text", "index": 26, "name": "name", "comment": null}, "next_step": {"type": "integer", "index": 27, "name": "next_step", "comment": null}, "owner_id": {"type": "text", "index": 28, "name": "owner_id", "comment": null}, "pricebook_2_id": {"type": "text", "index": 29, "name": "pricebook_2_id", "comment": null}, "probability": {"type": "double precision", "index": 30, "name": "probability", "comment": null}, "record_type_id": {"type": "text", "index": 31, "name": "record_type_id", "comment": null}, "stage_name": {"type": "text", "index": 32, "name": "stage_name", "comment": null}, "synced_quote_id": {"type": "integer", "index": 33, "name": "synced_quote_id", "comment": null}, "territory_2_id": {"type": "integer", "index": 34, "name": "territory_2_id", "comment": null}, "type": {"type": "text", "index": 35, "name": "type", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 36, "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.salesforce_source_integration_tests.sf_opportunity_data"}, "seed.salesforce_source_integration_tests.sf_opportunity_history_data": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_opportunity_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_active": {"type": "boolean", "index": 1, "name": "_fivetran_active", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_end", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 5, "name": "account_id", "comment": null}, "amount": {"type": "double precision", "index": 6, "name": "amount", "comment": null}, "campaign_id": {"type": "integer", "index": 7, "name": "campaign_id", "comment": null}, "close_date": {"type": "timestamp without time zone", "index": 8, "name": "close_date", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 9, "name": "created_date", "comment": null}, "description": {"type": "integer", "index": 10, "name": "description", "comment": null}, "expected_revenue": {"type": "double precision", "index": 11, "name": "expected_revenue", "comment": null}, "fiscal": {"type": "text", "index": 12, "name": "fiscal", "comment": null}, "fiscal_quarter": {"type": "integer", "index": 13, "name": "fiscal_quarter", "comment": null}, "fiscal_year": {"type": "integer", "index": 14, "name": "fiscal_year", "comment": null}, "forecast_category": {"type": "text", "index": 15, "name": "forecast_category", "comment": null}, "forecast_category_name": {"type": "text", "index": 16, "name": "forecast_category_name", "comment": null}, "has_open_activity": {"type": "boolean", "index": 17, "name": "has_open_activity", "comment": null}, "has_opportunity_line_item": {"type": "boolean", "index": 18, "name": "has_opportunity_line_item", "comment": null}, "has_overdue_task": {"type": "boolean", "index": 19, "name": "has_overdue_task", "comment": null}, "id": {"type": "text", "index": 20, "name": "id", "comment": null}, "is_closed": {"type": "boolean", "index": 21, "name": "is_closed", "comment": null}, "is_deleted": {"type": "boolean", "index": 22, "name": "is_deleted", "comment": null}, "is_won": {"type": "boolean", "index": 23, "name": "is_won", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 24, "name": "last_activity_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 25, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 26, "name": "last_viewed_date", "comment": null}, "lead_source": {"type": "text", "index": 27, "name": "lead_source", "comment": null}, "name": {"type": "text", "index": 28, "name": "name", "comment": null}, "next_step": {"type": "integer", "index": 29, "name": "next_step", "comment": null}, "owner_id": {"type": "text", "index": 30, "name": "owner_id", "comment": null}, "probability": {"type": "integer", "index": 31, "name": "probability", "comment": null}, "record_type_id": {"type": "text", "index": 32, "name": "record_type_id", "comment": null}, "stage_name": {"type": "text", "index": 33, "name": "stage_name", "comment": null}, "synced_quote_id": {"type": "integer", "index": 34, "name": "synced_quote_id", "comment": null}, "type": {"type": "text", "index": 35, "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.salesforce_source_integration_tests.sf_opportunity_history_data"}, "seed.salesforce_source_integration_tests.sf_opportunity_line_item_data": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_opportunity_line_item_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"product_2_id": {"type": "text", "index": 1, "name": "product_2_id", "comment": null}, "quantity": {"type": "integer", "index": 2, "name": "quantity", "comment": null}, "total_price": {"type": "double precision", "index": 3, "name": "total_price", "comment": null}, "description": {"type": "integer", "index": 4, "name": "description", "comment": null}, "discount": {"type": "integer", "index": 5, "name": "discount", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 6, "name": "last_modified_date", "comment": null}, "list_price": {"type": "integer", "index": 7, "name": "list_price", "comment": null}, "product_code": {"type": "text", "index": 8, "name": "product_code", "comment": null}, "unit_price": {"type": "double precision", "index": 9, "name": "unit_price", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 10, "name": "_fivetran_synced", "comment": null}, "is_deleted": {"type": "boolean", "index": 11, "name": "is_deleted", "comment": null}, "opportunity_id": {"type": "text", "index": 12, "name": "opportunity_id", "comment": null}, "last_modified_by_id": {"type": "text", "index": 13, "name": "last_modified_by_id", "comment": null}, "service_date": {"type": "timestamp without time zone", "index": 14, "name": "service_date", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 15, "name": "system_modstamp", "comment": null}, "name": {"type": "text", "index": 16, "name": "name", "comment": null}, "id": {"type": "text", "index": 17, "name": "id", "comment": null}, "created_by_id": {"type": "text", "index": 18, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 19, "name": "created_date", "comment": null}, "sort_order": {"type": "integer", "index": 20, "name": "sort_order", "comment": null}, "pricebook_entry_id": {"type": "text", "index": 21, "name": "pricebook_entry_id", "comment": null}, "one_saas_app_included_c": {"type": "integer", "index": 22, "name": "one_saas_app_included_c", "comment": null}, "one_saas_app_quantity_invoiced_c": {"type": "integer", "index": 23, "name": "one_saas_app_quantity_invoiced_c", "comment": null}, "one_saas_app_quantity_not_invoiced_c": {"type": "integer", "index": 24, "name": "one_saas_app_quantity_not_invoiced_c", "comment": null}, "has_quantity_schedule": {"type": "integer", "index": 25, "name": "has_quantity_schedule", "comment": null}, "has_revenue_schedule": {"type": "integer", "index": 26, "name": "has_revenue_schedule", "comment": null}, "has_schedule": {"type": "integer", "index": 27, "name": "has_schedule", "comment": null}, "event_volume_c": {"type": "integer", "index": 28, "name": "event_volume_c", "comment": null}, "roadmap_connections_c": {"type": "integer", "index": 29, "name": "roadmap_connections_c", "comment": null}, "row_volume_c": {"type": "integer", "index": 30, "name": "row_volume_c", "comment": null}, "months_c": {"type": "integer", "index": 31, "name": "months_c", "comment": null}, "netsuite_conn_term_contract_pricing_type_c": {"type": "integer", "index": 32, "name": "netsuite_conn_term_contract_pricing_type_c", "comment": null}, "netsuite_conn_discount_item_c": {"type": "integer", "index": 33, "name": "netsuite_conn_discount_item_c", "comment": null}, "netsuite_conn_user_entered_sales_price_c": {"type": "integer", "index": 34, "name": "netsuite_conn_user_entered_sales_price_c", "comment": null}, "netsuite_conn_item_category_c": {"type": "integer", "index": 35, "name": "netsuite_conn_item_category_c", "comment": null}, "netsuite_conn_terms_c": {"type": "integer", "index": 36, "name": "netsuite_conn_terms_c", "comment": null}, "netsuite_conn_net_suite_item_key_id_c": {"type": "integer", "index": 37, "name": "netsuite_conn_net_suite_item_key_id_c", "comment": null}, "netsuite_conn_pushed_from_net_suite_c": {"type": "boolean", "index": 38, "name": "netsuite_conn_pushed_from_net_suite_c", "comment": null}, "netsuite_conn_end_date_c": {"type": "integer", "index": 39, "name": "netsuite_conn_end_date_c", "comment": null}, "netsuite_conn_list_rate_c": {"type": "integer", "index": 40, "name": "netsuite_conn_list_rate_c", "comment": null}, "netsuite_conn_from_contract_item_id_c": {"type": "integer", "index": 41, "name": "netsuite_conn_from_contract_item_id_c", "comment": null}, "netsuite_conn_start_date_c": {"type": "integer", "index": 42, "name": "netsuite_conn_start_date_c", "comment": null}, "netsuite_conn_net_suite_item_id_import_c": {"type": "integer", "index": 43, "name": "netsuite_conn_net_suite_item_id_import_c", "comment": null}, "sbqq_parent_id_c": {"type": "text", "index": 44, "name": "sbqq_parent_id_c", "comment": null}, "sbqq_quote_line_c": {"type": "text", "index": 45, "name": "sbqq_quote_line_c", "comment": null}, "sbqq_subscription_type_c": {"type": "text", "index": 46, "name": "sbqq_subscription_type_c", "comment": null}, "product_family_c": {"type": "text", "index": 47, "name": "product_family_c", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 48, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 49, "name": "last_viewed_date", "comment": null}, "celigo_sfnsio_contract_item_id_c": {"type": "integer", "index": 50, "name": "celigo_sfnsio_contract_item_id_c", "comment": null}, "celigo_sfnsio_contract_term_c": {"type": "integer", "index": 51, "name": "celigo_sfnsio_contract_term_c", "comment": null}, "celigo_sfnsio_end_date_c": {"type": "integer", "index": 52, "name": "celigo_sfnsio_end_date_c", "comment": null}, "celigo_sfnsio_list_rate_c": {"type": "integer", "index": 53, "name": "celigo_sfnsio_list_rate_c", "comment": null}, "celigo_sfnsio_net_suite_line_id_c": {"type": "integer", "index": 54, "name": "celigo_sfnsio_net_suite_line_id_c", "comment": null}, "celigo_sfnsio_start_date_c": {"type": "integer", "index": 55, "name": "celigo_sfnsio_start_date_c", "comment": null}, "product_code_stamped_c": {"type": "integer", "index": 56, "name": "product_code_stamped_c", "comment": null}, "hvr_use_case_c": {"type": "boolean", "index": 57, "name": "hvr_use_case_c", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 58, "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.salesforce_source_integration_tests.sf_opportunity_line_item_data"}, "seed.salesforce_source_integration_tests.sf_order_data": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_order_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "activated_by_id": {"type": "text", "index": 4, "name": "activated_by_id", "comment": null}, "activated_date": {"type": "timestamp without time zone", "index": 5, "name": "activated_date", "comment": null}, "billing_city": {"type": "text", "index": 6, "name": "billing_city", "comment": null}, "billing_country": {"type": "text", "index": 7, "name": "billing_country", "comment": null}, "billing_country_code": {"type": "integer", "index": 8, "name": "billing_country_code", "comment": null}, "billing_geocode_accuracy": {"type": "integer", "index": 9, "name": "billing_geocode_accuracy", "comment": null}, "billing_latitude": {"type": "integer", "index": 10, "name": "billing_latitude", "comment": null}, "billing_longitude": {"type": "integer", "index": 11, "name": "billing_longitude", "comment": null}, "billing_postal_code": {"type": "text", "index": 12, "name": "billing_postal_code", "comment": null}, "billing_state": {"type": "text", "index": 13, "name": "billing_state", "comment": null}, "billing_state_code": {"type": "integer", "index": 14, "name": "billing_state_code", "comment": null}, "billing_street": {"type": "text", "index": 15, "name": "billing_street", "comment": null}, "company_authorized_by_id": {"type": "integer", "index": 16, "name": "company_authorized_by_id", "comment": null}, "contract_id": {"type": "integer", "index": 17, "name": "contract_id", "comment": null}, "created_by_id": {"type": "text", "index": 18, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 19, "name": "created_date", "comment": null}, "customer_authorized_by_id": {"type": "integer", "index": 20, "name": "customer_authorized_by_id", "comment": null}, "description": {"type": "integer", "index": 21, "name": "description", "comment": null}, "effective_date": {"type": "timestamp without time zone", "index": 22, "name": "effective_date", "comment": null}, "end_date": {"type": "timestamp without time zone", "index": 23, "name": "end_date", "comment": null}, "is_deleted": {"type": "boolean", "index": 24, "name": "is_deleted", "comment": null}, "is_reduction_order": {"type": "boolean", "index": 25, "name": "is_reduction_order", "comment": null}, "last_modified_by_id": {"type": "text", "index": 26, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 27, "name": "last_modified_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 28, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 29, "name": "last_viewed_date", "comment": null}, "order_number": {"type": "integer", "index": 30, "name": "order_number", "comment": null}, "original_order_id": {"type": "integer", "index": 31, "name": "original_order_id", "comment": null}, "owner_id": {"type": "text", "index": 32, "name": "owner_id", "comment": null}, "pricebook_2_id": {"type": "text", "index": 33, "name": "pricebook_2_id", "comment": null}, "shipping_city": {"type": "text", "index": 34, "name": "shipping_city", "comment": null}, "shipping_country": {"type": "text", "index": 35, "name": "shipping_country", "comment": null}, "shipping_country_code": {"type": "integer", "index": 36, "name": "shipping_country_code", "comment": null}, "shipping_geocode_accuracy": {"type": "integer", "index": 37, "name": "shipping_geocode_accuracy", "comment": null}, "shipping_latitude": {"type": "integer", "index": 38, "name": "shipping_latitude", "comment": null}, "shipping_longitude": {"type": "integer", "index": 39, "name": "shipping_longitude", "comment": null}, "shipping_postal_code": {"type": "integer", "index": 40, "name": "shipping_postal_code", "comment": null}, "shipping_state": {"type": "text", "index": 41, "name": "shipping_state", "comment": null}, "shipping_state_code": {"type": "integer", "index": 42, "name": "shipping_state_code", "comment": null}, "shipping_street": {"type": "text", "index": 43, "name": "shipping_street", "comment": null}, "status": {"type": "text", "index": 44, "name": "status", "comment": null}, "status_code": {"type": "text", "index": 45, "name": "status_code", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 46, "name": "system_modstamp", "comment": null}, "total_amount": {"type": "double precision", "index": 47, "name": "total_amount", "comment": null}, "type": {"type": "text", "index": 48, "name": "type", "comment": null}, "netsuite_conn_celigo_update_c": {"type": "boolean", "index": 49, "name": "netsuite_conn_celigo_update_c", "comment": null}, "netsuite_conn_net_suite_id_c": {"type": "integer", "index": 50, "name": "netsuite_conn_net_suite_id_c", "comment": null}, "netsuite_conn_net_suite_sync_err_c": {"type": "integer", "index": 51, "name": "netsuite_conn_net_suite_sync_err_c", "comment": null}, "netsuite_conn_pushed_from_net_suite_c": {"type": "boolean", "index": 52, "name": "netsuite_conn_pushed_from_net_suite_c", "comment": null}, "netsuite_conn_opportunity_c": {"type": "integer", "index": 53, "name": "netsuite_conn_opportunity_c", "comment": null}, "netsuite_conn_net_suite_order_status_c": {"type": "text", "index": 54, "name": "netsuite_conn_net_suite_order_status_c", "comment": null}, "netsuite_conn_sync_in_progress_c": {"type": "boolean", "index": 55, "name": "netsuite_conn_sync_in_progress_c", "comment": null}, "netsuite_conn_tax_total_c": {"type": "integer", "index": 56, "name": "netsuite_conn_tax_total_c", "comment": null}, "netsuite_conn_tracking_numbers_c": {"type": "integer", "index": 57, "name": "netsuite_conn_tracking_numbers_c", "comment": null}, "netsuite_conn_push_to_net_suite_c": {"type": "boolean", "index": 58, "name": "netsuite_conn_push_to_net_suite_c", "comment": null}, "netsuite_conn_document_id_c": {"type": "integer", "index": 59, "name": "netsuite_conn_document_id_c", "comment": null}, "netsuite_conn_subtotal_c": {"type": "integer", "index": 60, "name": "netsuite_conn_subtotal_c", "comment": null}, "netsuite_conn_discount_total_c": {"type": "integer", "index": 61, "name": "netsuite_conn_discount_total_c", "comment": null}, "netsuite_conn_total_c": {"type": "integer", "index": 62, "name": "netsuite_conn_total_c", "comment": null}, "netsuite_conn_net_suite_order_date_c": {"type": "timestamp without time zone", "index": 63, "name": "netsuite_conn_net_suite_order_date_c", "comment": null}, "netsuite_conn_ship_date_c": {"type": "integer", "index": 64, "name": "netsuite_conn_ship_date_c", "comment": null}, "netsuite_conn_quote_c": {"type": "integer", "index": 65, "name": "netsuite_conn_quote_c", "comment": null}, "netsuite_conn_net_suite_order_number_c": {"type": "text", "index": 66, "name": "netsuite_conn_net_suite_order_number_c", "comment": null}, "sbqq_contracted_c": {"type": "boolean", "index": 67, "name": "sbqq_contracted_c", "comment": null}, "sbqq_contracting_method_c": {"type": "text", "index": 68, "name": "sbqq_contracting_method_c", "comment": null}, "sbqq_payment_term_c": {"type": "text", "index": 69, "name": "sbqq_payment_term_c", "comment": null}, "sbqq_price_calc_status_c": {"type": "text", "index": 70, "name": "sbqq_price_calc_status_c", "comment": null}, "sbqq_price_calc_status_message_c": {"type": "integer", "index": 71, "name": "sbqq_price_calc_status_message_c", "comment": null}, "sbqq_quote_c": {"type": "text", "index": 72, "name": "sbqq_quote_c", "comment": null}, "sbqq_renewal_term_c": {"type": "integer", "index": 73, "name": "sbqq_renewal_term_c", "comment": null}, "sbqq_renewal_uplift_rate_c": {"type": "integer", "index": 74, "name": "sbqq_renewal_uplift_rate_c", "comment": null}, "ava_sfcpq_ava_tax_message_c": {"type": "text", "index": 75, "name": "ava_sfcpq_ava_tax_message_c", "comment": null}, "ava_sfcpq_entity_use_code_c": {"type": "integer", "index": 76, "name": "ava_sfcpq_entity_use_code_c", "comment": null}, "ava_sfcpq_invoice_message_c": {"type": "integer", "index": 77, "name": "ava_sfcpq_invoice_message_c", "comment": null}, "ava_sfcpq_is_seller_importer_of_record_c": {"type": "boolean", "index": 78, "name": "ava_sfcpq_is_seller_importer_of_record_c", "comment": null}, "ava_sfcpq_order_calculate_tax_c": {"type": "boolean", "index": 79, "name": "ava_sfcpq_order_calculate_tax_c", "comment": null}, "ava_sfcpq_sales_tax_amount_c": {"type": "integer", "index": 80, "name": "ava_sfcpq_sales_tax_amount_c", "comment": null}, "blng_bill_now_c": {"type": "boolean", "index": 81, "name": "blng_bill_now_c", "comment": null}, "blng_billing_account_c": {"type": "text", "index": 82, "name": "blng_billing_account_c", "comment": null}, "blng_billing_day_of_month_c": {"type": "integer", "index": 83, "name": "blng_billing_day_of_month_c", "comment": null}, "blng_invoice_batch_c": {"type": "text", "index": 84, "name": "blng_invoice_batch_c", "comment": null}, "amendment_type_c": {"type": "integer", "index": 85, "name": "amendment_type_c", "comment": null}, "credit_summary_c": {"type": "text", "index": 86, "name": "credit_summary_c", "comment": null}, "evergreen_c": {"type": "boolean", "index": 87, "name": "evergreen_c", "comment": null}, "invoicing_type_c": {"type": "text", "index": 88, "name": "invoicing_type_c", "comment": null}, "legal_entity_c": {"type": "text", "index": 89, "name": "legal_entity_c", "comment": null}, "prepaid_billing_frequency_c": {"type": "text", "index": 90, "name": "prepaid_billing_frequency_c", "comment": null}, "prepaid_order_c": {"type": "boolean", "index": 91, "name": "prepaid_order_c", "comment": null}, "update_subscriptions_only_c": {"type": "boolean", "index": 92, "name": "update_subscriptions_only_c", "comment": null}, "order_auto_activated_c": {"type": "boolean", "index": 93, "name": "order_auto_activated_c", "comment": null}, "synced_to_net_suite_c": {"type": "boolean", "index": 94, "name": "synced_to_net_suite_c", "comment": null}, "purchase_order_number_c": {"type": "integer", "index": 95, "name": "purchase_order_number_c", "comment": null}, "celigo_sfnsio_discount_total_net_suite_c": {"type": "integer", "index": 96, "name": "celigo_sfnsio_discount_total_net_suite_c", "comment": null}, "celigo_sfnsio_net_suite_id_c": {"type": "integer", "index": 97, "name": "celigo_sfnsio_net_suite_id_c", "comment": null}, "celigo_sfnsio_net_suite_order_number_c": {"type": "text", "index": 98, "name": "celigo_sfnsio_net_suite_order_number_c", "comment": null}, "celigo_sfnsio_net_suite_order_status_c": {"type": "integer", "index": 99, "name": "celigo_sfnsio_net_suite_order_status_c", "comment": null}, "celigo_sfnsio_net_suite_record_c": {"type": "text", "index": 100, "name": "celigo_sfnsio_net_suite_record_c", "comment": null}, "celigo_sfnsio_ship_date_c": {"type": "integer", "index": 101, "name": "celigo_sfnsio_ship_date_c", "comment": null}, "celigo_sfnsio_skip_export_to_net_suite_c": {"type": "boolean", "index": 102, "name": "celigo_sfnsio_skip_export_to_net_suite_c", "comment": null}, "celigo_sfnsio_sub_total_net_suite_c": {"type": "integer", "index": 103, "name": "celigo_sfnsio_sub_total_net_suite_c", "comment": null}, "celigo_sfnsio_tax_total_net_suite_c": {"type": "integer", "index": 104, "name": "celigo_sfnsio_tax_total_net_suite_c", "comment": null}, "celigo_sfnsio_test_mode_record_c": {"type": "boolean", "index": 105, "name": "celigo_sfnsio_test_mode_record_c", "comment": null}, "celigo_sfnsio_total_net_suite_c": {"type": "integer", "index": 106, "name": "celigo_sfnsio_total_net_suite_c", "comment": null}, "amend_with_rollover_spend_type_c": {"type": "boolean", "index": 107, "name": "amend_with_rollover_spend_type_c", "comment": null}, "customer_spend_type_c": {"type": "integer", "index": 108, "name": "customer_spend_type_c", "comment": null}, "order_spend_type_c": {"type": "integer", "index": 109, "name": "order_spend_type_c", "comment": null}, "opportunity_id": {"type": "integer", "index": 110, "name": "opportunity_id", "comment": null}, "purchase_summary_c": {"type": "integer", "index": 111, "name": "purchase_summary_c", "comment": null}, "is_hvr_legacy_order_c": {"type": "integer", "index": 112, "name": "is_hvr_legacy_order_c", "comment": null}, "ironclad_workflow_c": {"type": "integer", "index": 113, "name": "ironclad_workflow_c", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 114, "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.salesforce_source_integration_tests.sf_order_data"}, "seed.salesforce_source_integration_tests.sf_product_2_data": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_product_2_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"last_referenced_date": {"type": "timestamp without time zone", "index": 1, "name": "last_referenced_date", "comment": null}, "is_active": {"type": "boolean", "index": 2, "name": "is_active", "comment": null}, "description": {"type": "integer", "index": 3, "name": "description", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 4, "name": "last_modified_date", "comment": null}, "record_type_id": {"type": "text", "index": 5, "name": "record_type_id", "comment": null}, "product_code": {"type": "integer", "index": 6, "name": "product_code", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 8, "name": "last_viewed_date", "comment": null}, "is_deleted": {"type": "boolean", "index": 9, "name": "is_deleted", "comment": null}, "last_modified_by_id": {"type": "text", "index": 10, "name": "last_modified_by_id", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 11, "name": "system_modstamp", "comment": null}, "name": {"type": "text", "index": 12, "name": "name", "comment": null}, "id": {"type": "text", "index": 13, "name": "id", "comment": null}, "created_by_id": {"type": "text", "index": 14, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 15, "name": "created_date", "comment": null}, "family": {"type": "text", "index": 16, "name": "family", "comment": null}, "max_volume_c": {"type": "integer", "index": 17, "name": "max_volume_c", "comment": null}, "min_volume_c": {"type": "integer", "index": 18, "name": "min_volume_c", "comment": null}, "request_name_c": {"type": "integer", "index": 19, "name": "request_name_c", "comment": null}, "default_quantity_c": {"type": "integer", "index": 20, "name": "default_quantity_c", "comment": null}, "account_c": {"type": "integer", "index": 21, "name": "account_c", "comment": null}, "related_product_c": {"type": "integer", "index": 22, "name": "related_product_c", "comment": null}, "picklist_value_c": {"type": "integer", "index": 23, "name": "picklist_value_c", "comment": null}, "as_input_c": {"type": "integer", "index": 24, "name": "as_input_c", "comment": null}, "as_output_c": {"type": "integer", "index": 25, "name": "as_output_c", "comment": null}, "status_c": {"type": "integer", "index": 26, "name": "status_c", "comment": null}, "number_of_quantity_installments": {"type": "integer", "index": 27, "name": "number_of_quantity_installments", "comment": null}, "number_of_revenue_installments": {"type": "integer", "index": 28, "name": "number_of_revenue_installments", "comment": null}, "quantity_installment_period": {"type": "integer", "index": 29, "name": "quantity_installment_period", "comment": null}, "quantity_schedule_type": {"type": "integer", "index": 30, "name": "quantity_schedule_type", "comment": null}, "revenue_installment_period": {"type": "integer", "index": 31, "name": "revenue_installment_period", "comment": null}, "revenue_schedule_type": {"type": "integer", "index": 32, "name": "revenue_schedule_type", "comment": null}, "connections_c": {"type": "integer", "index": 33, "name": "connections_c", "comment": null}, "event_volume_c": {"type": "integer", "index": 34, "name": "event_volume_c", "comment": null}, "roadmap_connections_c": {"type": "integer", "index": 35, "name": "roadmap_connections_c", "comment": null}, "row_volume_c": {"type": "integer", "index": 36, "name": "row_volume_c", "comment": null}, "display_url": {"type": "integer", "index": 37, "name": "display_url", "comment": null}, "external_data_source_id": {"type": "integer", "index": 38, "name": "external_data_source_id", "comment": null}, "external_id": {"type": "integer", "index": 39, "name": "external_id", "comment": null}, "quantity_unit_of_measure": {"type": "integer", "index": 40, "name": "quantity_unit_of_measure", "comment": null}, "stock_keeping_unit": {"type": "integer", "index": 41, "name": "stock_keeping_unit", "comment": null}, "features_c": {"type": "integer", "index": 42, "name": "features_c", "comment": null}, "tier_3_price_c": {"type": "integer", "index": 43, "name": "tier_3_price_c", "comment": null}, "tier_2_price_c": {"type": "integer", "index": 44, "name": "tier_2_price_c", "comment": null}, "tier_4_price_c": {"type": "integer", "index": 45, "name": "tier_4_price_c", "comment": null}, "tier_1_price_c": {"type": "integer", "index": 46, "name": "tier_1_price_c", "comment": null}, "netsuite_conn_sync_in_progress_c": {"type": "boolean", "index": 47, "name": "netsuite_conn_sync_in_progress_c", "comment": null}, "netsuite_conn_celigo_update_c": {"type": "boolean", "index": 48, "name": "netsuite_conn_celigo_update_c", "comment": null}, "netsuite_conn_term_contract_pricing_type_c": {"type": "integer", "index": 49, "name": "netsuite_conn_term_contract_pricing_type_c", "comment": null}, "netsuite_conn_net_suite_id_c": {"type": "integer", "index": 50, "name": "netsuite_conn_net_suite_id_c", "comment": null}, "netsuite_conn_net_suite_sync_err_c": {"type": "text", "index": 51, "name": "netsuite_conn_net_suite_sync_err_c", "comment": null}, "netsuite_conn_push_to_net_suite_c": {"type": "boolean", "index": 52, "name": "netsuite_conn_push_to_net_suite_c", "comment": null}, "netsuite_conn_item_category_c": {"type": "integer", "index": 53, "name": "netsuite_conn_item_category_c", "comment": null}, "netsuite_conn_net_suite_item_type_c": {"type": "text", "index": 54, "name": "netsuite_conn_net_suite_item_type_c", "comment": null}, "netsuite_conn_sub_type_c": {"type": "text", "index": 55, "name": "netsuite_conn_sub_type_c", "comment": null}, "is_new_c": {"type": "boolean", "index": 56, "name": "is_new_c", "comment": null}, "product_metadata_c": {"type": "integer", "index": 57, "name": "product_metadata_c", "comment": null}, "product_metadata_del_c": {"type": "integer", "index": 58, "name": "product_metadata_del_c", "comment": null}, "sbqq_asset_amendment_behavior_c": {"type": "text", "index": 59, "name": "sbqq_asset_amendment_behavior_c", "comment": null}, "sbqq_asset_conversion_c": {"type": "text", "index": 60, "name": "sbqq_asset_conversion_c", "comment": null}, "sbqq_batch_quantity_c": {"type": "integer", "index": 61, "name": "sbqq_batch_quantity_c", "comment": null}, "sbqq_billing_frequency_c": {"type": "text", "index": 62, "name": "sbqq_billing_frequency_c", "comment": null}, "sbqq_billing_type_c": {"type": "text", "index": 63, "name": "sbqq_billing_type_c", "comment": null}, "sbqq_block_pricing_field_c": {"type": "text", "index": 64, "name": "sbqq_block_pricing_field_c", "comment": null}, "sbqq_charge_type_c": {"type": "text", "index": 65, "name": "sbqq_charge_type_c", "comment": null}, "sbqq_component_c": {"type": "boolean", "index": 66, "name": "sbqq_component_c", "comment": null}, "sbqq_compound_discount_rate_c": {"type": "integer", "index": 67, "name": "sbqq_compound_discount_rate_c", "comment": null}, "sbqq_configuration_event_c": {"type": "integer", "index": 68, "name": "sbqq_configuration_event_c", "comment": null}, "sbqq_configuration_field_set_c": {"type": "integer", "index": 69, "name": "sbqq_configuration_field_set_c", "comment": null}, "sbqq_configuration_fields_c": {"type": "integer", "index": 70, "name": "sbqq_configuration_fields_c", "comment": null}, "sbqq_configuration_form_title_c": {"type": "integer", "index": 71, "name": "sbqq_configuration_form_title_c", "comment": null}, "sbqq_configuration_type_c": {"type": "integer", "index": 72, "name": "sbqq_configuration_type_c", "comment": null}, "sbqq_configuration_validator_c": {"type": "integer", "index": 73, "name": "sbqq_configuration_validator_c", "comment": null}, "sbqq_configured_code_pattern_c": {"type": "integer", "index": 74, "name": "sbqq_configured_code_pattern_c", "comment": null}, "sbqq_configured_description_pattern_c": {"type": "integer", "index": 75, "name": "sbqq_configured_description_pattern_c", "comment": null}, "sbqq_cost_editable_c": {"type": "boolean", "index": 76, "name": "sbqq_cost_editable_c", "comment": null}, "sbqq_cost_schedule_c": {"type": "integer", "index": 77, "name": "sbqq_cost_schedule_c", "comment": null}, "sbqq_custom_configuration_page_c": {"type": "integer", "index": 78, "name": "sbqq_custom_configuration_page_c", "comment": null}, "sbqq_custom_configuration_required_c": {"type": "boolean", "index": 79, "name": "sbqq_custom_configuration_required_c", "comment": null}, "sbqq_customer_community_availability_c": {"type": "integer", "index": 80, "name": "sbqq_customer_community_availability_c", "comment": null}, "sbqq_default_pricing_table_c": {"type": "integer", "index": 81, "name": "sbqq_default_pricing_table_c", "comment": null}, "sbqq_default_quantity_c": {"type": "integer", "index": 82, "name": "sbqq_default_quantity_c", "comment": null}, "sbqq_description_locked_c": {"type": "boolean", "index": 83, "name": "sbqq_description_locked_c", "comment": null}, "sbqq_discount_category_c": {"type": "integer", "index": 84, "name": "sbqq_discount_category_c", "comment": null}, "sbqq_discount_schedule_c": {"type": "integer", "index": 85, "name": "sbqq_discount_schedule_c", "comment": null}, "sbqq_dynamic_pricing_constraint_c": {"type": "integer", "index": 86, "name": "sbqq_dynamic_pricing_constraint_c", "comment": null}, "sbqq_exclude_from_maintenance_c": {"type": "boolean", "index": 87, "name": "sbqq_exclude_from_maintenance_c", "comment": null}, "sbqq_exclude_from_opportunity_c": {"type": "boolean", "index": 88, "name": "sbqq_exclude_from_opportunity_c", "comment": null}, "sbqq_externally_configurable_c": {"type": "boolean", "index": 89, "name": "sbqq_externally_configurable_c", "comment": null}, "sbqq_generate_contracted_price_c": {"type": "integer", "index": 90, "name": "sbqq_generate_contracted_price_c", "comment": null}, "sbqq_has_configuration_attributes_c": {"type": "boolean", "index": 91, "name": "sbqq_has_configuration_attributes_c", "comment": null}, "sbqq_has_consumption_schedule_c": {"type": "boolean", "index": 92, "name": "sbqq_has_consumption_schedule_c", "comment": null}, "sbqq_hidden_c": {"type": "boolean", "index": 93, "name": "sbqq_hidden_c", "comment": null}, "sbqq_hide_price_in_search_results_c": {"type": "boolean", "index": 94, "name": "sbqq_hide_price_in_search_results_c", "comment": null}, "sbqq_include_in_maintenance_c": {"type": "boolean", "index": 95, "name": "sbqq_include_in_maintenance_c", "comment": null}, "sbqq_new_quote_group_c": {"type": "boolean", "index": 96, "name": "sbqq_new_quote_group_c", "comment": null}, "sbqq_non_discountable_c": {"type": "boolean", "index": 97, "name": "sbqq_non_discountable_c", "comment": null}, "sbqq_non_partner_discountable_c": {"type": "boolean", "index": 98, "name": "sbqq_non_partner_discountable_c", "comment": null}, "sbqq_option_layout_c": {"type": "integer", "index": 99, "name": "sbqq_option_layout_c", "comment": null}, "sbqq_option_selection_method_c": {"type": "text", "index": 100, "name": "sbqq_option_selection_method_c", "comment": null}, "sbqq_optional_c": {"type": "boolean", "index": 101, "name": "sbqq_optional_c", "comment": null}, "sbqq_price_editable_c": {"type": "boolean", "index": 102, "name": "sbqq_price_editable_c", "comment": null}, "sbqq_pricing_method_c": {"type": "text", "index": 103, "name": "sbqq_pricing_method_c", "comment": null}, "sbqq_pricing_method_editable_c": {"type": "boolean", "index": 104, "name": "sbqq_pricing_method_editable_c", "comment": null}, "sbqq_product_picture_id_c": {"type": "integer", "index": 105, "name": "sbqq_product_picture_id_c", "comment": null}, "sbqq_quantity_editable_c": {"type": "boolean", "index": 106, "name": "sbqq_quantity_editable_c", "comment": null}, "sbqq_quantity_scale_c": {"type": "integer", "index": 107, "name": "sbqq_quantity_scale_c", "comment": null}, "sbqq_reconfiguration_disabled_c": {"type": "boolean", "index": 108, "name": "sbqq_reconfiguration_disabled_c", "comment": null}, "sbqq_renewal_product_c": {"type": "integer", "index": 109, "name": "sbqq_renewal_product_c", "comment": null}, "sbqq_sort_order_c": {"type": "integer", "index": 110, "name": "sbqq_sort_order_c", "comment": null}, "sbqq_specifications_c": {"type": "integer", "index": 111, "name": "sbqq_specifications_c", "comment": null}, "sbqq_subscription_base_c": {"type": "text", "index": 112, "name": "sbqq_subscription_base_c", "comment": null}, "sbqq_subscription_category_c": {"type": "integer", "index": 113, "name": "sbqq_subscription_category_c", "comment": null}, "sbqq_subscription_percent_c": {"type": "integer", "index": 114, "name": "sbqq_subscription_percent_c", "comment": null}, "sbqq_subscription_pricing_c": {"type": "text", "index": 115, "name": "sbqq_subscription_pricing_c", "comment": null}, "sbqq_subscription_target_c": {"type": "integer", "index": 116, "name": "sbqq_subscription_target_c", "comment": null}, "sbqq_subscription_term_c": {"type": "integer", "index": 117, "name": "sbqq_subscription_term_c", "comment": null}, "sbqq_subscription_type_c": {"type": "text", "index": 118, "name": "sbqq_subscription_type_c", "comment": null}, "sbqq_tax_code_c": {"type": "integer", "index": 119, "name": "sbqq_tax_code_c", "comment": null}, "sbqq_taxable_c": {"type": "boolean", "index": 120, "name": "sbqq_taxable_c", "comment": null}, "sbqq_term_discount_level_c": {"type": "integer", "index": 121, "name": "sbqq_term_discount_level_c", "comment": null}, "sbqq_term_discount_schedule_c": {"type": "integer", "index": 122, "name": "sbqq_term_discount_schedule_c", "comment": null}, "sbqq_upgrade_credit_c": {"type": "integer", "index": 123, "name": "sbqq_upgrade_credit_c", "comment": null}, "sbqq_upgrade_ratio_c": {"type": "integer", "index": 124, "name": "sbqq_upgrade_ratio_c", "comment": null}, "sbqq_upgrade_source_c": {"type": "integer", "index": 125, "name": "sbqq_upgrade_source_c", "comment": null}, "sbqq_upgrade_target_c": {"type": "integer", "index": 126, "name": "sbqq_upgrade_target_c", "comment": null}, "connector_type_c": {"type": "text", "index": 127, "name": "connector_type_c", "comment": null}, "pbf_pro_type_discount_c": {"type": "boolean", "index": 128, "name": "pbf_pro_type_discount_c", "comment": null}, "dimension_c": {"type": "text", "index": 129, "name": "dimension_c", "comment": null}, "connector_status_c": {"type": "text", "index": 130, "name": "connector_status_c", "comment": null}, "dimension_definition_c": {"type": "integer", "index": 131, "name": "dimension_definition_c", "comment": null}, "ava_sfcpq_tax_code_c": {"type": "integer", "index": 132, "name": "ava_sfcpq_tax_code_c", "comment": null}, "paid_consumption_c": {"type": "integer", "index": 133, "name": "paid_consumption_c", "comment": null}, "is_complimentary_c": {"type": "boolean", "index": 134, "name": "is_complimentary_c", "comment": null}, "product_external_id_c": {"type": "integer", "index": 135, "name": "product_external_id_c", "comment": null}, "blng_billing_rule_c": {"type": "text", "index": 136, "name": "blng_billing_rule_c", "comment": null}, "blng_revenue_recognition_rule_c": {"type": "text", "index": 137, "name": "blng_revenue_recognition_rule_c", "comment": null}, "blng_tax_rule_c": {"type": "text", "index": 138, "name": "blng_tax_rule_c", "comment": null}, "deployment_date_c": {"type": "integer", "index": 139, "name": "deployment_date_c", "comment": null}, "do_not_prorate_c": {"type": "boolean", "index": 140, "name": "do_not_prorate_c", "comment": null}, "celigo_sfnsio_netsuite_id_c": {"type": "integer", "index": 141, "name": "celigo_sfnsio_netsuite_id_c", "comment": null}, "sbqq_enable_large_configuration_c": {"type": "boolean", "index": 142, "name": "sbqq_enable_large_configuration_c", "comment": null}, "sbqq_pricing_guidance_c": {"type": "integer", "index": 143, "name": "sbqq_pricing_guidance_c", "comment": null}, "celigo_sfnsio_item_pricing_type_c": {"type": "integer", "index": 144, "name": "celigo_sfnsio_item_pricing_type_c", "comment": null}, "celigo_sfnsio_test_mode_record_c": {"type": "boolean", "index": 145, "name": "celigo_sfnsio_test_mode_record_c", "comment": null}, "celigo_sfnsio_celigo_last_modified_date_c": {"type": "timestamp without time zone", "index": 146, "name": "celigo_sfnsio_celigo_last_modified_date_c", "comment": null}, "celigo_sfnsio_net_suite_record_c": {"type": "integer", "index": 147, "name": "celigo_sfnsio_net_suite_record_c", "comment": null}, "celigo_sfnsio_skip_export_to_net_suite_c": {"type": "boolean", "index": 148, "name": "celigo_sfnsio_skip_export_to_net_suite_c", "comment": null}, "celigo_sfnsio_net_suite_item_type_c": {"type": "integer", "index": 149, "name": "celigo_sfnsio_net_suite_item_type_c", "comment": null}, "celigo_sfnsio_net_suite_id_c": {"type": "integer", "index": 150, "name": "celigo_sfnsio_net_suite_id_c", "comment": null}, "promo_code_c": {"type": "integer", "index": 151, "name": "promo_code_c", "comment": null}, "product_category_c": {"type": "integer", "index": 152, "name": "product_category_c", "comment": null}, "product_source_c": {"type": "integer", "index": 153, "name": "product_source_c", "comment": null}, "non_recurring_c": {"type": "boolean", "index": 154, "name": "non_recurring_c", "comment": null}, "is_archived": {"type": "boolean", "index": 155, "name": "is_archived", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 156, "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.salesforce_source_integration_tests.sf_product_2_data"}, "seed.salesforce_source_integration_tests.sf_task_data": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_task_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"referral_account_c": {"type": "integer", "index": 1, "name": "referral_account_c", "comment": null}, "who_id": {"type": "text", "index": 2, "name": "who_id", "comment": null}, "call_disposition": {"type": "integer", "index": 3, "name": "call_disposition", "comment": null}, "recurrence_day_of_month": {"type": "integer", "index": 4, "name": "recurrence_day_of_month", "comment": null}, "owner_id": {"type": "text", "index": 5, "name": "owner_id", "comment": null}, "recurrence_end_date_only": {"type": "timestamp without time zone", "index": 6, "name": "recurrence_end_date_only", "comment": null}, "subject": {"type": "text", "index": 7, "name": "subject", "comment": null}, "description": {"type": "text", "index": 8, "name": "description", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 9, "name": "last_modified_date", "comment": null}, "recurrence_time_zone_sid_key": {"type": "integer", "index": 10, "name": "recurrence_time_zone_sid_key", "comment": null}, "is_recurrence": {"type": "boolean", "index": 11, "name": "is_recurrence", "comment": null}, "what_count": {"type": "integer", "index": 12, "name": "what_count", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 13, "name": "_fivetran_synced", "comment": null}, "call_object": {"type": "integer", "index": 14, "name": "call_object", "comment": null}, "is_deleted": {"type": "boolean", "index": 15, "name": "is_deleted", "comment": null}, "recurrence_day_of_week_mask": {"type": "integer", "index": 16, "name": "recurrence_day_of_week_mask", "comment": null}, "last_modified_by_id": {"type": "text", "index": 17, "name": "last_modified_by_id", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 18, "name": "system_modstamp", "comment": null}, "recurrence_regenerated_type": {"type": "integer", "index": 19, "name": "recurrence_regenerated_type", "comment": null}, "id": {"type": "text", "index": 20, "name": "id", "comment": null}, "recurrence_type": {"type": "integer", "index": 21, "name": "recurrence_type", "comment": null}, "reminder_date_time": {"type": "timestamp without time zone", "index": 22, "name": "reminder_date_time", "comment": null}, "call_type": {"type": "integer", "index": 23, "name": "call_type", "comment": null}, "is_high_priority": {"type": "boolean", "index": 24, "name": "is_high_priority", "comment": null}, "is_closed": {"type": "boolean", "index": 25, "name": "is_closed", "comment": null}, "recurrence_month_of_year": {"type": "integer", "index": 26, "name": "recurrence_month_of_year", "comment": null}, "is_reminder_set": {"type": "boolean", "index": 27, "name": "is_reminder_set", "comment": null}, "activity_date": {"type": "timestamp without time zone", "index": 28, "name": "activity_date", "comment": null}, "recurrence_instance": {"type": "integer", "index": 29, "name": "recurrence_instance", "comment": null}, "priority": {"type": "text", "index": 30, "name": "priority", "comment": null}, "recurrence_interval": {"type": "integer", "index": 31, "name": "recurrence_interval", "comment": null}, "who_count": {"type": "integer", "index": 32, "name": "who_count", "comment": null}, "recurrence_start_date_only": {"type": "timestamp without time zone", "index": 33, "name": "recurrence_start_date_only", "comment": null}, "account_id": {"type": "text", "index": 34, "name": "account_id", "comment": null}, "referral_contact_c": {"type": "integer", "index": 35, "name": "referral_contact_c", "comment": null}, "call_duration_in_seconds": {"type": "integer", "index": 36, "name": "call_duration_in_seconds", "comment": null}, "created_by_id": {"type": "text", "index": 37, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 38, "name": "created_date", "comment": null}, "recurrence_activity_id": {"type": "integer", "index": 39, "name": "recurrence_activity_id", "comment": null}, "what_id": {"type": "text", "index": 40, "name": "what_id", "comment": null}, "task_subtype": {"type": "text", "index": 41, "name": "task_subtype", "comment": null}, "status": {"type": "text", "index": 42, "name": "status", "comment": null}, "invitee_uuid_c": {"type": "integer", "index": 43, "name": "invitee_uuid_c", "comment": null}, "type": {"type": "text", "index": 44, "name": "type", "comment": null}, "no_show_c": {"type": "boolean", "index": 45, "name": "no_show_c", "comment": null}, "first_meeting_held_c": {"type": "integer", "index": 46, "name": "first_meeting_held_c", "comment": null}, "associated_sdr_c": {"type": "integer", "index": 47, "name": "associated_sdr_c", "comment": null}, "first_meeting_c": {"type": "integer", "index": 48, "name": "first_meeting_c", "comment": null}, "call_recording_c": {"type": "integer", "index": 49, "name": "call_recording_c", "comment": null}, "affectlayer_chorus_call_id_c": {"type": "integer", "index": 50, "name": "affectlayer_chorus_call_id_c", "comment": null}, "affectlayer_affect_layer_call_id_c": {"type": "integer", "index": 51, "name": "affectlayer_affect_layer_call_id_c", "comment": null}, "last_rep_activity_date_c": {"type": "integer", "index": 52, "name": "last_rep_activity_date_c", "comment": null}, "lid_url_c": {"type": "integer", "index": 53, "name": "lid_url_c", "comment": null}, "lid_date_sent_c": {"type": "integer", "index": 54, "name": "lid_date_sent_c", "comment": null}, "record_type_id": {"type": "text", "index": 55, "name": "record_type_id", "comment": null}, "sales_loft_step_id_c": {"type": "integer", "index": 56, "name": "sales_loft_step_id_c", "comment": null}, "sales_loft_step_name_c": {"type": "integer", "index": 57, "name": "sales_loft_step_name_c", "comment": null}, "sales_loft_step_type_c": {"type": "integer", "index": 58, "name": "sales_loft_step_type_c", "comment": null}, "sales_loft_email_template_id_c": {"type": "integer", "index": 59, "name": "sales_loft_email_template_id_c", "comment": null}, "sales_loft_external_identifier_c": {"type": "integer", "index": 60, "name": "sales_loft_external_identifier_c", "comment": null}, "sales_loft_cadence_id_c": {"type": "integer", "index": 61, "name": "sales_loft_cadence_id_c", "comment": null}, "sales_loft_clicked_count_c": {"type": "integer", "index": 62, "name": "sales_loft_clicked_count_c", "comment": null}, "sales_loft_cadence_name_c": {"type": "integer", "index": 63, "name": "sales_loft_cadence_name_c", "comment": null}, "sales_loft_reply_count_c": {"type": "integer", "index": 64, "name": "sales_loft_reply_count_c", "comment": null}, "call_disposition_c": {"type": "integer", "index": 65, "name": "call_disposition_c", "comment": null}, "sales_loft_email_template_title_c": {"type": "integer", "index": 66, "name": "sales_loft_email_template_title_c", "comment": null}, "sales_loft_step_day_new_c": {"type": "integer", "index": 67, "name": "sales_loft_step_day_new_c", "comment": null}, "call_disposition_2_c": {"type": "integer", "index": 68, "name": "call_disposition_2_c", "comment": null}, "sales_loft_viewed_count_c": {"type": "integer", "index": 69, "name": "sales_loft_viewed_count_c", "comment": null}, "sales_loft_1_sales_loft_step_day_c": {"type": "integer", "index": 70, "name": "sales_loft_1_sales_loft_step_day_c", "comment": null}, "sales_loft_1_sales_loft_clicked_count_c": {"type": "integer", "index": 71, "name": "sales_loft_1_sales_loft_clicked_count_c", "comment": null}, "sales_loft_1_sales_loft_view_count_c": {"type": "integer", "index": 72, "name": "sales_loft_1_sales_loft_view_count_c", "comment": null}, "sales_loft_1_call_disposition_c": {"type": "integer", "index": 73, "name": "sales_loft_1_call_disposition_c", "comment": null}, "sales_loft_1_sales_loft_replies_count_c": {"type": "integer", "index": 74, "name": "sales_loft_1_sales_loft_replies_count_c", "comment": null}, "sales_loft_1_sales_loft_cadence_name_c": {"type": "integer", "index": 75, "name": "sales_loft_1_sales_loft_cadence_name_c", "comment": null}, "sales_loft_1_call_sentiment_c": {"type": "integer", "index": 76, "name": "sales_loft_1_call_sentiment_c", "comment": null}, "sales_loft_1_sales_loft_email_template_title_c": {"type": "integer", "index": 77, "name": "sales_loft_1_sales_loft_email_template_title_c", "comment": null}, "completed_date_time": {"type": "timestamp without time zone", "index": 78, "name": "completed_date_time", "comment": null}, "is_a_co_sell_activity_c": {"type": "integer", "index": 79, "name": "is_a_co_sell_activity_c", "comment": null}, "partner_contact_c": {"type": "integer", "index": 80, "name": "partner_contact_c", "comment": null}, "co_selling_activity_c": {"type": "integer", "index": 81, "name": "co_selling_activity_c", "comment": null}, "description_c": {"type": "integer", "index": 82, "name": "description_c", "comment": null}, "co_sell_partner_account_c": {"type": "integer", "index": 83, "name": "co_sell_partner_account_c", "comment": null}, "campaign_c": {"type": "integer", "index": 84, "name": "campaign_c", "comment": null}, "partner_account_c": {"type": "integer", "index": 85, "name": "partner_account_c", "comment": null}, "topic_c": {"type": "integer", "index": 86, "name": "topic_c", "comment": null}, "event_name_c": {"type": "integer", "index": 87, "name": "event_name_c", "comment": null}, "attendance_number_c": {"type": "integer", "index": 88, "name": "attendance_number_c", "comment": null}, "partner_activity_type_c": {"type": "integer", "index": 89, "name": "partner_activity_type_c", "comment": null}, "proof_of_referral_c": {"type": "integer", "index": 90, "name": "proof_of_referral_c", "comment": null}, "how_did_you_bring_value_or_create_trust_c": {"type": "integer", "index": 91, "name": "how_did_you_bring_value_or_create_trust_c", "comment": null}, "how_did_you_bring_value_or_earn_trust_c": {"type": "integer", "index": 92, "name": "how_did_you_bring_value_or_earn_trust_c", "comment": null}, "duration_in_minutes_c": {"type": "integer", "index": 93, "name": "duration_in_minutes_c", "comment": null}, "vidyard_c": {"type": "boolean", "index": 94, "name": "vidyard_c", "comment": null}, "expected_payment_date_c": {"type": "integer", "index": 95, "name": "expected_payment_date_c", "comment": null}, "execute_collections_plan_activity_c": {"type": "boolean", "index": 96, "name": "execute_collections_plan_activity_c", "comment": null}, "collections_hold_c": {"type": "boolean", "index": 97, "name": "collections_hold_c", "comment": null}, "opportunity_c": {"type": "integer", "index": 98, "name": "opportunity_c", "comment": null}, "meeting_type_c": {"type": "text", "index": 99, "name": "meeting_type_c", "comment": null}, "meeting_name_c": {"type": "text", "index": 100, "name": "meeting_name_c", "comment": null}, "bizible_2_bizible_id_c": {"type": "integer", "index": 101, "name": "bizible_2_bizible_id_c", "comment": null}, "bizible_2_bizible_touchpoint_date_c": {"type": "integer", "index": 102, "name": "bizible_2_bizible_touchpoint_date_c", "comment": null}, "assigned_to_role_c": {"type": "text", "index": 103, "name": "assigned_to_role_c", "comment": null}, "assigned_to_name_c": {"type": "text", "index": 104, "name": "assigned_to_name_c", "comment": null}, "legacy_hvr_id_c": {"type": "integer", "index": 105, "name": "legacy_hvr_id_c", "comment": null}, "is_archived": {"type": "boolean", "index": 106, "name": "is_archived", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 107, "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.salesforce_source_integration_tests.sf_task_data"}, "seed.salesforce_source_integration_tests.sf_user_data": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_user_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}, "about_me": {"type": "integer", "index": 3, "name": "about_me", "comment": null}, "account_id": {"type": "integer", "index": 4, "name": "account_id", "comment": null}, "alias": {"type": "text", "index": 5, "name": "alias", "comment": null}, "badge_text": {"type": "text", "index": 6, "name": "badge_text", "comment": null}, "banner_photo_url": {"type": "text", "index": 7, "name": "banner_photo_url", "comment": null}, "call_center_id": {"type": "integer", "index": 8, "name": "call_center_id", "comment": null}, "city": {"type": "integer", "index": 9, "name": "city", "comment": null}, "community_nickname": {"type": "text", "index": 10, "name": "community_nickname", "comment": null}, "company_name": {"type": "integer", "index": 11, "name": "company_name", "comment": null}, "contact_id": {"type": "integer", "index": 12, "name": "contact_id", "comment": null}, "country": {"type": "text", "index": 13, "name": "country", "comment": null}, "country_code": {"type": "text", "index": 14, "name": "country_code", "comment": null}, "default_group_notification_frequency": {"type": "text", "index": 15, "name": "default_group_notification_frequency", "comment": null}, "delegated_approver_id": {"type": "text", "index": 16, "name": "delegated_approver_id", "comment": null}, "department": {"type": "integer", "index": 17, "name": "department", "comment": null}, "digest_frequency": {"type": "text", "index": 18, "name": "digest_frequency", "comment": null}, "division": {"type": "integer", "index": 19, "name": "division", "comment": null}, "email": {"type": "text", "index": 20, "name": "email", "comment": null}, "email_encoding_key": {"type": "text", "index": 21, "name": "email_encoding_key", "comment": null}, "email_preferences_auto_bcc": {"type": "boolean", "index": 22, "name": "email_preferences_auto_bcc", "comment": null}, "employee_number": {"type": "integer", "index": 23, "name": "employee_number", "comment": null}, "extension": {"type": "integer", "index": 24, "name": "extension", "comment": null}, "fax": {"type": "integer", "index": 25, "name": "fax", "comment": null}, "federation_identifier": {"type": "integer", "index": 26, "name": "federation_identifier", "comment": null}, "first_name": {"type": "text", "index": 27, "name": "first_name", "comment": null}, "forecast_enabled": {"type": "boolean", "index": 28, "name": "forecast_enabled", "comment": null}, "full_photo_url": {"type": "text", "index": 29, "name": "full_photo_url", "comment": null}, "geocode_accuracy": {"type": "integer", "index": 30, "name": "geocode_accuracy", "comment": null}, "id": {"type": "text", "index": 31, "name": "id", "comment": null}, "individual_id": {"type": "integer", "index": 32, "name": "individual_id", "comment": null}, "is_active": {"type": "boolean", "index": 33, "name": "is_active", "comment": null}, "is_profile_photo_active": {"type": "boolean", "index": 34, "name": "is_profile_photo_active", "comment": null}, "language_locale_key": {"type": "text", "index": 35, "name": "language_locale_key", "comment": null}, "last_login_date": {"type": "timestamp without time zone", "index": 36, "name": "last_login_date", "comment": null}, "last_name": {"type": "text", "index": 37, "name": "last_name", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 38, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 39, "name": "last_viewed_date", "comment": null}, "latitude": {"type": "double precision", "index": 40, "name": "latitude", "comment": null}, "locale_sid_key": {"type": "text", "index": 41, "name": "locale_sid_key", "comment": null}, "longitude": {"type": "double precision", "index": 42, "name": "longitude", "comment": null}, "manager_id": {"type": "text", "index": 43, "name": "manager_id", "comment": null}, "medium_banner_photo_url": {"type": "text", "index": 44, "name": "medium_banner_photo_url", "comment": null}, "mobile_phone": {"type": "integer", "index": 45, "name": "mobile_phone", "comment": null}, "name": {"type": "text", "index": 46, "name": "name", "comment": null}, "offline_trial_expiration_date": {"type": "timestamp without time zone", "index": 47, "name": "offline_trial_expiration_date", "comment": null}, "phone": {"type": "text", "index": 48, "name": "phone", "comment": null}, "postal_code": {"type": "integer", "index": 49, "name": "postal_code", "comment": null}, "profile_id": {"type": "text", "index": 50, "name": "profile_id", "comment": null}, "receives_admin_info_emails": {"type": "boolean", "index": 51, "name": "receives_admin_info_emails", "comment": null}, "receives_info_emails": {"type": "boolean", "index": 52, "name": "receives_info_emails", "comment": null}, "sender_email": {"type": "integer", "index": 53, "name": "sender_email", "comment": null}, "sender_name": {"type": "integer", "index": 54, "name": "sender_name", "comment": null}, "signature": {"type": "integer", "index": 55, "name": "signature", "comment": null}, "small_banner_photo_url": {"type": "text", "index": 56, "name": "small_banner_photo_url", "comment": null}, "small_photo_url": {"type": "text", "index": 57, "name": "small_photo_url", "comment": null}, "state": {"type": "integer", "index": 58, "name": "state", "comment": null}, "state_code": {"type": "integer", "index": 59, "name": "state_code", "comment": null}, "street": {"type": "integer", "index": 60, "name": "street", "comment": null}, "time_zone_sid_key": {"type": "text", "index": 61, "name": "time_zone_sid_key", "comment": null}, "title": {"type": "text", "index": 62, "name": "title", "comment": null}, "user_role_id": {"type": "text", "index": 63, "name": "user_role_id", "comment": null}, "user_type": {"type": "text", "index": 64, "name": "user_type", "comment": null}, "username": {"type": "text", "index": 65, "name": "username", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 66, "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.salesforce_source_integration_tests.sf_user_data"}, "seed.salesforce_source_integration_tests.sf_user_role_data": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_user_role_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}, "case_access_for_account_owner": {"type": "text", "index": 3, "name": "case_access_for_account_owner", "comment": null}, "contact_access_for_account_owner": {"type": "text", "index": 4, "name": "contact_access_for_account_owner", "comment": null}, "developer_name": {"type": "text", "index": 5, "name": "developer_name", "comment": null}, "forecast_user_id": {"type": "integer", "index": 6, "name": "forecast_user_id", "comment": null}, "id": {"type": "text", "index": 7, "name": "id", "comment": null}, "may_forecast_manager_share": {"type": "boolean", "index": 8, "name": "may_forecast_manager_share", "comment": null}, "name": {"type": "text", "index": 9, "name": "name", "comment": null}, "opportunity_access_for_account_owner": {"type": "text", "index": 10, "name": "opportunity_access_for_account_owner", "comment": null}, "parent_role_id": {"type": "text", "index": 11, "name": "parent_role_id", "comment": null}, "portal_type": {"type": "text", "index": 12, "name": "portal_type", "comment": null}, "rollup_description": {"type": "text", "index": 13, "name": "rollup_description", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 14, "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.salesforce_source_integration_tests.sf_user_role_data"}, "model.salesforce_source.stg_salesforce__account": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__account", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_number": {"type": "integer", "index": 2, "name": "account_number", "comment": null}, "account_source": {"type": "text", "index": 3, "name": "account_source", "comment": null}, "annual_revenue": {"type": "numeric(28,6)", "index": 4, "name": "annual_revenue", "comment": null}, "billing_city": {"type": "text", "index": 5, "name": "billing_city", "comment": null}, "billing_country": {"type": "text", "index": 6, "name": "billing_country", "comment": null}, "billing_postal_code": {"type": "text", "index": 7, "name": "billing_postal_code", "comment": null}, "billing_state": {"type": "text", "index": 8, "name": "billing_state", "comment": null}, "billing_state_code": {"type": "text", "index": 9, "name": "billing_state_code", "comment": null}, "billing_street": {"type": "text", "index": 10, "name": "billing_street", "comment": null}, "account_description": {"type": "text", "index": 11, "name": "account_description", "comment": null}, "account_id": {"type": "text", "index": 12, "name": "account_id", "comment": null}, "industry": {"type": "text", "index": 13, "name": "industry", "comment": null}, "is_deleted": {"type": "boolean", "index": 14, "name": "is_deleted", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 15, "name": "last_activity_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 16, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 17, "name": "last_viewed_date", "comment": null}, "master_record_id": {"type": "text", "index": 18, "name": "master_record_id", "comment": null}, "account_name": {"type": "text", "index": 19, "name": "account_name", "comment": null}, "number_of_employees": {"type": "integer", "index": 20, "name": "number_of_employees", "comment": null}, "owner_id": {"type": "text", "index": 21, "name": "owner_id", "comment": null}, "ownership": {"type": "integer", "index": 22, "name": "ownership", "comment": null}, "parent_id": {"type": "integer", "index": 23, "name": "parent_id", "comment": null}, "rating": {"type": "integer", "index": 24, "name": "rating", "comment": null}, "record_type_id": {"type": "text", "index": 25, "name": "record_type_id", "comment": null}, "shipping_city": {"type": "integer", "index": 26, "name": "shipping_city", "comment": null}, "shipping_country": {"type": "text", "index": 27, "name": "shipping_country", "comment": null}, "shipping_country_code": {"type": "text", "index": 28, "name": "shipping_country_code", "comment": null}, "shipping_postal_code": {"type": "integer", "index": 29, "name": "shipping_postal_code", "comment": null}, "shipping_state": {"type": "integer", "index": 30, "name": "shipping_state", "comment": null}, "shipping_state_code": {"type": "integer", "index": 31, "name": "shipping_state_code", "comment": null}, "shipping_street": {"type": "integer", "index": 32, "name": "shipping_street", "comment": null}, "type": {"type": "text", "index": 33, "name": "type", "comment": null}, "website": {"type": "text", "index": 34, "name": "website", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.salesforce_source.stg_salesforce__account"}, "model.salesforce_source.stg_salesforce__account_history": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__account_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"account_id": {"type": "text", "index": 1, "name": "account_id", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_end", "comment": null}, "_fivetran_date": {"type": "date", "index": 4, "name": "_fivetran_date", "comment": null}, "history_unique_key": {"type": "text", "index": 5, "name": "history_unique_key", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 6, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "account_number": {"type": "integer", "index": 8, "name": "account_number", "comment": null}, "account_source": {"type": "text", "index": 9, "name": "account_source", "comment": null}, "annual_revenue": {"type": "double precision", "index": 10, "name": "annual_revenue", "comment": null}, "billing_city": {"type": "text", "index": 11, "name": "billing_city", "comment": null}, "billing_country": {"type": "text", "index": 12, "name": "billing_country", "comment": null}, "billing_postal_code": {"type": "text", "index": 13, "name": "billing_postal_code", "comment": null}, "billing_state": {"type": "text", "index": 14, "name": "billing_state", "comment": null}, "billing_street": {"type": "text", "index": 15, "name": "billing_street", "comment": null}, "description": {"type": "text", "index": 16, "name": "description", "comment": null}, "industry": {"type": "text", "index": 17, "name": "industry", "comment": null}, "is_deleted": {"type": "boolean", "index": 18, "name": "is_deleted", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 19, "name": "last_activity_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 20, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 21, "name": "last_viewed_date", "comment": null}, "master_record_id": {"type": "text", "index": 22, "name": "master_record_id", "comment": null}, "name": {"type": "text", "index": 23, "name": "name", "comment": null}, "number_of_employees": {"type": "integer", "index": 24, "name": "number_of_employees", "comment": null}, "owner_id": {"type": "text", "index": 25, "name": "owner_id", "comment": null}, "ownership": {"type": "integer", "index": 26, "name": "ownership", "comment": null}, "parent_id": {"type": "integer", "index": 27, "name": "parent_id", "comment": null}, "rating": {"type": "integer", "index": 28, "name": "rating", "comment": null}, "record_type_id": {"type": "text", "index": 29, "name": "record_type_id", "comment": null}, "shipping_city": {"type": "integer", "index": 30, "name": "shipping_city", "comment": null}, "shipping_country": {"type": "text", "index": 31, "name": "shipping_country", "comment": null}, "shipping_postal_code": {"type": "integer", "index": 32, "name": "shipping_postal_code", "comment": null}, "shipping_state": {"type": "integer", "index": 33, "name": "shipping_state", "comment": null}, "shipping_street": {"type": "integer", "index": 34, "name": "shipping_street", "comment": null}, "type": {"type": "text", "index": 35, "name": "type", "comment": null}, "website": {"type": "text", "index": 36, "name": "website", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.salesforce_source.stg_salesforce__account_history"}, "model.salesforce_source.stg_salesforce__contact": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__contact", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "contact_id": {"type": "text", "index": 2, "name": "contact_id", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "department": {"type": "integer", "index": 4, "name": "department", "comment": null}, "contact_description": {"type": "text", "index": 5, "name": "contact_description", "comment": null}, "email": {"type": "text", "index": 6, "name": "email", "comment": null}, "first_name": {"type": "text", "index": 7, "name": "first_name", "comment": null}, "home_phone": {"type": "integer", "index": 8, "name": "home_phone", "comment": null}, "individual_id": {"type": "integer", "index": 9, "name": "individual_id", "comment": null}, "is_deleted": {"type": "boolean", "index": 10, "name": "is_deleted", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 11, "name": "last_activity_date", "comment": null}, "last_modified_by_id": {"type": "text", "index": 12, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 13, "name": "last_modified_date", "comment": null}, "last_name": {"type": "text", "index": 14, "name": "last_name", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 15, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 16, "name": "last_viewed_date", "comment": null}, "lead_source": {"type": "text", "index": 17, "name": "lead_source", "comment": null}, "mailing_city": {"type": "text", "index": 18, "name": "mailing_city", "comment": null}, "mailing_country": {"type": "text", "index": 19, "name": "mailing_country", "comment": null}, "mailing_country_code": {"type": "text", "index": 20, "name": "mailing_country_code", "comment": null}, "mailing_postal_code": {"type": "integer", "index": 21, "name": "mailing_postal_code", "comment": null}, "mailing_state": {"type": "text", "index": 22, "name": "mailing_state", "comment": null}, "mailing_state_code": {"type": "text", "index": 23, "name": "mailing_state_code", "comment": null}, "mailing_street": {"type": "text", "index": 24, "name": "mailing_street", "comment": null}, "master_record_id": {"type": "integer", "index": 25, "name": "master_record_id", "comment": null}, "mobile_phone": {"type": "integer", "index": 26, "name": "mobile_phone", "comment": null}, "contact_name": {"type": "text", "index": 27, "name": "contact_name", "comment": null}, "owner_id": {"type": "text", "index": 28, "name": "owner_id", "comment": null}, "phone": {"type": "text", "index": 29, "name": "phone", "comment": null}, "reports_to_id": {"type": "integer", "index": 30, "name": "reports_to_id", "comment": null}, "title": {"type": "text", "index": 31, "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.salesforce_source.stg_salesforce__contact"}, "model.salesforce_source.stg_salesforce__contact_history": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__contact_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"contact_id": {"type": "text", "index": 1, "name": "contact_id", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_end", "comment": null}, "_fivetran_date": {"type": "date", "index": 4, "name": "_fivetran_date", "comment": null}, "history_unique_key": {"type": "text", "index": 5, "name": "history_unique_key", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 6, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 8, "name": "account_id", "comment": null}, "email": {"type": "text", "index": 9, "name": "email", "comment": null}, "first_name": {"type": "text", "index": 10, "name": "first_name", "comment": null}, "is_deleted": {"type": "boolean", "index": 11, "name": "is_deleted", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 12, "name": "last_activity_date", "comment": null}, "last_modified_by_id": {"type": "text", "index": 13, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 14, "name": "last_modified_date", "comment": null}, "last_name": {"type": "text", "index": 15, "name": "last_name", "comment": null}, "last_referenced_date": {"type": "integer", "index": 16, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 17, "name": "last_viewed_date", "comment": null}, "mailing_city": {"type": "text", "index": 18, "name": "mailing_city", "comment": null}, "mailing_country": {"type": "text", "index": 19, "name": "mailing_country", "comment": null}, "mailing_country_code": {"type": "text", "index": 20, "name": "mailing_country_code", "comment": null}, "mailing_postal_code": {"type": "integer", "index": 21, "name": "mailing_postal_code", "comment": null}, "mailing_state": {"type": "text", "index": 22, "name": "mailing_state", "comment": null}, "mailing_street": {"type": "text", "index": 23, "name": "mailing_street", "comment": null}, "master_record_id": {"type": "integer", "index": 24, "name": "master_record_id", "comment": null}, "mobile_phone": {"type": "integer", "index": 25, "name": "mobile_phone", "comment": null}, "name": {"type": "text", "index": 26, "name": "name", "comment": null}, "owner_id": {"type": "text", "index": 27, "name": "owner_id", "comment": null}, "phone": {"type": "text", "index": 28, "name": "phone", "comment": null}, "reports_to_id": {"type": "integer", "index": 29, "name": "reports_to_id", "comment": null}, "title": {"type": "text", "index": 30, "name": "title", "comment": null}, "lead_source": {"type": "text", "index": 31, "name": "lead_source", "comment": null}, "description": {"type": "text", "index": 32, "name": "description", "comment": null}, "individual_id": {"type": "integer", "index": 33, "name": "individual_id", "comment": null}, "home_phone": {"type": "integer", "index": 34, "name": "home_phone", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.salesforce_source.stg_salesforce__contact_history"}, "model.salesforce_source.stg_salesforce__event": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__event", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "event_id": {"type": "text", "index": 2, "name": "event_id", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "activity_date": {"type": "timestamp without time zone", "index": 4, "name": "activity_date", "comment": null}, "activity_date_time": {"type": "timestamp without time zone", "index": 5, "name": "activity_date_time", "comment": null}, "created_by_id": {"type": "text", "index": 6, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 7, "name": "created_date", "comment": null}, "event_description": {"type": "text", "index": 8, "name": "event_description", "comment": null}, "end_date": {"type": "timestamp without time zone", "index": 9, "name": "end_date", "comment": null}, "end_date_time": {"type": "timestamp without time zone", "index": 10, "name": "end_date_time", "comment": null}, "event_subtype": {"type": "text", "index": 11, "name": "event_subtype", "comment": null}, "group_event_type": {"type": "integer", "index": 12, "name": "group_event_type", "comment": null}, "is_archived": {"type": "boolean", "index": 13, "name": "is_archived", "comment": null}, "is_child": {"type": "boolean", "index": 14, "name": "is_child", "comment": null}, "is_deleted": {"type": "boolean", "index": 15, "name": "is_deleted", "comment": null}, "is_group_event": {"type": "boolean", "index": 16, "name": "is_group_event", "comment": null}, "is_recurrence": {"type": "boolean", "index": 17, "name": "is_recurrence", "comment": null}, "last_modified_by_id": {"type": "text", "index": 18, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 19, "name": "last_modified_date", "comment": null}, "location": {"type": "integer", "index": 20, "name": "location", "comment": null}, "owner_id": {"type": "text", "index": 21, "name": "owner_id", "comment": null}, "start_date_time": {"type": "timestamp without time zone", "index": 22, "name": "start_date_time", "comment": null}, "subject": {"type": "text", "index": 23, "name": "subject", "comment": null}, "type": {"type": "text", "index": 24, "name": "type", "comment": null}, "what_count": {"type": "integer", "index": 25, "name": "what_count", "comment": null}, "what_id": {"type": "text", "index": 26, "name": "what_id", "comment": null}, "who_count": {"type": "integer", "index": 27, "name": "who_count", "comment": null}, "who_id": {"type": "text", "index": 28, "name": "who_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.salesforce_source.stg_salesforce__event"}, "model.salesforce_source.stg_salesforce__lead": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__lead", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "lead_id": {"type": "text", "index": 2, "name": "lead_id", "comment": null}, "annual_revenue": {"type": "integer", "index": 3, "name": "annual_revenue", "comment": null}, "city": {"type": "integer", "index": 4, "name": "city", "comment": null}, "company": {"type": "text", "index": 5, "name": "company", "comment": null}, "converted_account_id": {"type": "text", "index": 6, "name": "converted_account_id", "comment": null}, "converted_contact_id": {"type": "text", "index": 7, "name": "converted_contact_id", "comment": null}, "converted_date": {"type": "timestamp without time zone", "index": 8, "name": "converted_date", "comment": null}, "converted_opportunity_id": {"type": "integer", "index": 9, "name": "converted_opportunity_id", "comment": null}, "country": {"type": "integer", "index": 10, "name": "country", "comment": null}, "country_code": {"type": "integer", "index": 11, "name": "country_code", "comment": null}, "created_by_id": {"type": "text", "index": 12, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 13, "name": "created_date", "comment": null}, "lead_description": {"type": "integer", "index": 14, "name": "lead_description", "comment": null}, "email": {"type": "text", "index": 15, "name": "email", "comment": null}, "email_bounced_date": {"type": "timestamp without time zone", "index": 16, "name": "email_bounced_date", "comment": null}, "email_bounced_reason": {"type": "integer", "index": 17, "name": "email_bounced_reason", "comment": null}, "first_name": {"type": "text", "index": 18, "name": "first_name", "comment": null}, "has_opted_out_of_email": {"type": "boolean", "index": 19, "name": "has_opted_out_of_email", "comment": null}, "individual_id": {"type": "integer", "index": 20, "name": "individual_id", "comment": null}, "industry": {"type": "text", "index": 21, "name": "industry", "comment": null}, "is_converted": {"type": "boolean", "index": 22, "name": "is_converted", "comment": null}, "is_deleted": {"type": "boolean", "index": 23, "name": "is_deleted", "comment": null}, "is_unread_by_owner": {"type": "boolean", "index": 24, "name": "is_unread_by_owner", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 25, "name": "last_activity_date", "comment": null}, "last_modified_by_id": {"type": "text", "index": 26, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 27, "name": "last_modified_date", "comment": null}, "last_name": {"type": "text", "index": 28, "name": "last_name", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 29, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 30, "name": "last_viewed_date", "comment": null}, "lead_source": {"type": "integer", "index": 31, "name": "lead_source", "comment": null}, "master_record_id": {"type": "integer", "index": 32, "name": "master_record_id", "comment": null}, "mobile_phone": {"type": "integer", "index": 33, "name": "mobile_phone", "comment": null}, "lead_name": {"type": "text", "index": 34, "name": "lead_name", "comment": null}, "number_of_employees": {"type": "integer", "index": 35, "name": "number_of_employees", "comment": null}, "owner_id": {"type": "text", "index": 36, "name": "owner_id", "comment": null}, "phone": {"type": "integer", "index": 37, "name": "phone", "comment": null}, "postal_code": {"type": "integer", "index": 38, "name": "postal_code", "comment": null}, "state": {"type": "integer", "index": 39, "name": "state", "comment": null}, "state_code": {"type": "integer", "index": 40, "name": "state_code", "comment": null}, "status": {"type": "text", "index": 41, "name": "status", "comment": null}, "street": {"type": "integer", "index": 42, "name": "street", "comment": null}, "title": {"type": "integer", "index": 43, "name": "title", "comment": null}, "website": {"type": "integer", "index": 44, "name": "website", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.salesforce_source.stg_salesforce__lead"}, "model.salesforce_source.stg_salesforce__opportunity": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__opportunity", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "amount": {"type": "numeric(28,6)", "index": 3, "name": "amount", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "close_date": {"type": "timestamp without time zone", "index": 5, "name": "close_date", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 6, "name": "created_date", "comment": null}, "opportunity_description": {"type": "integer", "index": 7, "name": "opportunity_description", "comment": null}, "expected_revenue": {"type": "numeric(28,6)", "index": 8, "name": "expected_revenue", "comment": null}, "fiscal": {"type": "text", "index": 9, "name": "fiscal", "comment": null}, "fiscal_quarter": {"type": "integer", "index": 10, "name": "fiscal_quarter", "comment": null}, "fiscal_year": {"type": "integer", "index": 11, "name": "fiscal_year", "comment": null}, "forecast_category": {"type": "text", "index": 12, "name": "forecast_category", "comment": null}, "forecast_category_name": {"type": "text", "index": 13, "name": "forecast_category_name", "comment": null}, "has_open_activity": {"type": "boolean", "index": 14, "name": "has_open_activity", "comment": null}, "has_opportunity_line_item": {"type": "boolean", "index": 15, "name": "has_opportunity_line_item", "comment": null}, "has_overdue_task": {"type": "boolean", "index": 16, "name": "has_overdue_task", "comment": null}, "opportunity_id": {"type": "text", "index": 17, "name": "opportunity_id", "comment": null}, "is_closed": {"type": "boolean", "index": 18, "name": "is_closed", "comment": null}, "is_deleted": {"type": "boolean", "index": 19, "name": "is_deleted", "comment": null}, "is_won": {"type": "boolean", "index": 20, "name": "is_won", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 21, "name": "last_activity_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 22, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 23, "name": "last_viewed_date", "comment": null}, "lead_source": {"type": "text", "index": 24, "name": "lead_source", "comment": null}, "opportunity_name": {"type": "text", "index": 25, "name": "opportunity_name", "comment": null}, "next_step": {"type": "integer", "index": 26, "name": "next_step", "comment": null}, "owner_id": {"type": "text", "index": 27, "name": "owner_id", "comment": null}, "probability": {"type": "double precision", "index": 28, "name": "probability", "comment": null}, "record_type_id": {"type": "text", "index": 29, "name": "record_type_id", "comment": null}, "stage_name": {"type": "text", "index": 30, "name": "stage_name", "comment": null}, "synced_quote_id": {"type": "integer", "index": 31, "name": "synced_quote_id", "comment": null}, "type": {"type": "text", "index": 32, "name": "type", "comment": null}, "is_created_this_month": {"type": "boolean", "index": 33, "name": "is_created_this_month", "comment": null}, "is_created_this_quarter": {"type": "boolean", "index": 34, "name": "is_created_this_quarter", "comment": null}, "days_since_created": {"type": "integer", "index": 35, "name": "days_since_created", "comment": null}, "days_to_close": {"type": "integer", "index": 36, "name": "days_to_close", "comment": null}, "is_closed_this_month": {"type": "boolean", "index": 37, "name": "is_closed_this_month", "comment": null}, "is_closed_this_quarter": {"type": "boolean", "index": 38, "name": "is_closed_this_quarter", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.salesforce_source.stg_salesforce__opportunity"}, "model.salesforce_source.stg_salesforce__opportunity_history": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__opportunity_history", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"opportunity_id": {"type": "text", "index": 1, "name": "opportunity_id", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_end", "comment": null}, "_fivetran_date": {"type": "date", "index": 4, "name": "_fivetran_date", "comment": null}, "history_unique_key": {"type": "text", "index": 5, "name": "history_unique_key", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 6, "name": "_fivetran_active", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 8, "name": "account_id", "comment": null}, "amount": {"type": "double precision", "index": 9, "name": "amount", "comment": null}, "campaign_id": {"type": "integer", "index": 10, "name": "campaign_id", "comment": null}, "close_date": {"type": "timestamp without time zone", "index": 11, "name": "close_date", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 12, "name": "created_date", "comment": null}, "description": {"type": "integer", "index": 13, "name": "description", "comment": null}, "expected_revenue": {"type": "double precision", "index": 14, "name": "expected_revenue", "comment": null}, "fiscal": {"type": "text", "index": 15, "name": "fiscal", "comment": null}, "fiscal_quarter": {"type": "integer", "index": 16, "name": "fiscal_quarter", "comment": null}, "fiscal_year": {"type": "integer", "index": 17, "name": "fiscal_year", "comment": null}, "forecast_category": {"type": "text", "index": 18, "name": "forecast_category", "comment": null}, "forecast_category_name": {"type": "text", "index": 19, "name": "forecast_category_name", "comment": null}, "has_open_activity": {"type": "boolean", "index": 20, "name": "has_open_activity", "comment": null}, "has_opportunity_line_item": {"type": "boolean", "index": 21, "name": "has_opportunity_line_item", "comment": null}, "has_overdue_task": {"type": "boolean", "index": 22, "name": "has_overdue_task", "comment": null}, "is_closed": {"type": "boolean", "index": 23, "name": "is_closed", "comment": null}, "is_deleted": {"type": "boolean", "index": 24, "name": "is_deleted", "comment": null}, "is_won": {"type": "boolean", "index": 25, "name": "is_won", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 26, "name": "last_activity_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 27, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 28, "name": "last_viewed_date", "comment": null}, "lead_source": {"type": "text", "index": 29, "name": "lead_source", "comment": null}, "name": {"type": "text", "index": 30, "name": "name", "comment": null}, "next_step": {"type": "integer", "index": 31, "name": "next_step", "comment": null}, "owner_id": {"type": "text", "index": 32, "name": "owner_id", "comment": null}, "probability": {"type": "integer", "index": 33, "name": "probability", "comment": null}, "record_type_id": {"type": "text", "index": 34, "name": "record_type_id", "comment": null}, "stage_name": {"type": "text", "index": 35, "name": "stage_name", "comment": null}, "synced_quote_id": {"type": "integer", "index": 36, "name": "synced_quote_id", "comment": null}, "type": {"type": "text", "index": 37, "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.salesforce_source.stg_salesforce__opportunity_history"}, "model.salesforce_source.stg_salesforce__opportunity_line_item": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__opportunity_line_item", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "opportunity_line_item_id": {"type": "text", "index": 2, "name": "opportunity_line_item_id", "comment": null}, "created_by_id": {"type": "text", "index": 3, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 4, "name": "created_date", "comment": null}, "opportunity_line_item_description": {"type": "integer", "index": 5, "name": "opportunity_line_item_description", "comment": null}, "discount": {"type": "integer", "index": 6, "name": "discount", "comment": null}, "has_quantity_schedule": {"type": "integer", "index": 7, "name": "has_quantity_schedule", "comment": null}, "has_revenue_schedule": {"type": "integer", "index": 8, "name": "has_revenue_schedule", "comment": null}, "has_schedule": {"type": "integer", "index": 9, "name": "has_schedule", "comment": null}, "is_deleted": {"type": "boolean", "index": 10, "name": "is_deleted", "comment": null}, "last_modified_by_id": {"type": "text", "index": 11, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 12, "name": "last_modified_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 13, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 14, "name": "last_viewed_date", "comment": null}, "list_price": {"type": "integer", "index": 15, "name": "list_price", "comment": null}, "opportunity_line_item_name": {"type": "text", "index": 16, "name": "opportunity_line_item_name", "comment": null}, "opportunity_id": {"type": "text", "index": 17, "name": "opportunity_id", "comment": null}, "pricebook_entry_id": {"type": "text", "index": 18, "name": "pricebook_entry_id", "comment": null}, "product_2_id": {"type": "text", "index": 19, "name": "product_2_id", "comment": null}, "product_code": {"type": "text", "index": 20, "name": "product_code", "comment": null}, "quantity": {"type": "integer", "index": 21, "name": "quantity", "comment": null}, "service_date": {"type": "timestamp without time zone", "index": 22, "name": "service_date", "comment": null}, "sort_order": {"type": "integer", "index": 23, "name": "sort_order", "comment": null}, "total_price": {"type": "double precision", "index": 24, "name": "total_price", "comment": null}, "unit_price": {"type": "double precision", "index": 25, "name": "unit_price", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.salesforce_source.stg_salesforce__opportunity_line_item"}, "model.salesforce_source.stg_salesforce__order": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__order", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "order_id": {"type": "text", "index": 2, "name": "order_id", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "activated_by_id": {"type": "text", "index": 4, "name": "activated_by_id", "comment": null}, "activated_date": {"type": "timestamp without time zone", "index": 5, "name": "activated_date", "comment": null}, "billing_city": {"type": "text", "index": 6, "name": "billing_city", "comment": null}, "billing_country": {"type": "text", "index": 7, "name": "billing_country", "comment": null}, "billing_country_code": {"type": "integer", "index": 8, "name": "billing_country_code", "comment": null}, "billing_postal_code": {"type": "text", "index": 9, "name": "billing_postal_code", "comment": null}, "billing_state": {"type": "text", "index": 10, "name": "billing_state", "comment": null}, "billing_state_code": {"type": "integer", "index": 11, "name": "billing_state_code", "comment": null}, "billing_street": {"type": "text", "index": 12, "name": "billing_street", "comment": null}, "contract_id": {"type": "integer", "index": 13, "name": "contract_id", "comment": null}, "created_by_id": {"type": "text", "index": 14, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 15, "name": "created_date", "comment": null}, "order_description": {"type": "integer", "index": 16, "name": "order_description", "comment": null}, "end_date": {"type": "timestamp without time zone", "index": 17, "name": "end_date", "comment": null}, "is_deleted": {"type": "boolean", "index": 18, "name": "is_deleted", "comment": null}, "last_modified_by_id": {"type": "text", "index": 19, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 20, "name": "last_modified_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 21, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 22, "name": "last_viewed_date", "comment": null}, "opportunity_id": {"type": "integer", "index": 23, "name": "opportunity_id", "comment": null}, "order_number": {"type": "integer", "index": 24, "name": "order_number", "comment": null}, "original_order_id": {"type": "integer", "index": 25, "name": "original_order_id", "comment": null}, "owner_id": {"type": "text", "index": 26, "name": "owner_id", "comment": null}, "pricebook_2_id": {"type": "text", "index": 27, "name": "pricebook_2_id", "comment": null}, "shipping_city": {"type": "text", "index": 28, "name": "shipping_city", "comment": null}, "shipping_country": {"type": "text", "index": 29, "name": "shipping_country", "comment": null}, "shipping_country_code": {"type": "integer", "index": 30, "name": "shipping_country_code", "comment": null}, "shipping_postal_code": {"type": "integer", "index": 31, "name": "shipping_postal_code", "comment": null}, "shipping_state": {"type": "text", "index": 32, "name": "shipping_state", "comment": null}, "shipping_state_code": {"type": "integer", "index": 33, "name": "shipping_state_code", "comment": null}, "shipping_street": {"type": "text", "index": 34, "name": "shipping_street", "comment": null}, "status": {"type": "text", "index": 35, "name": "status", "comment": null}, "total_amount": {"type": "double precision", "index": 36, "name": "total_amount", "comment": null}, "type": {"type": "text", "index": 37, "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.salesforce_source.stg_salesforce__order"}, "model.salesforce_source.stg_salesforce__product_2": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__product_2", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "product_2_id": {"type": "text", "index": 2, "name": "product_2_id", "comment": null}, "created_by_id": {"type": "text", "index": 3, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 4, "name": "created_date", "comment": null}, "product_2_description": {"type": "integer", "index": 5, "name": "product_2_description", "comment": null}, "display_url": {"type": "integer", "index": 6, "name": "display_url", "comment": null}, "external_id": {"type": "integer", "index": 7, "name": "external_id", "comment": null}, "family": {"type": "text", "index": 8, "name": "family", "comment": null}, "is_active": {"type": "boolean", "index": 9, "name": "is_active", "comment": null}, "is_archived": {"type": "boolean", "index": 10, "name": "is_archived", "comment": null}, "is_deleted": {"type": "boolean", "index": 11, "name": "is_deleted", "comment": null}, "last_modified_by_id": {"type": "text", "index": 12, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 13, "name": "last_modified_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 14, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 15, "name": "last_viewed_date", "comment": null}, "product_2_name": {"type": "text", "index": 16, "name": "product_2_name", "comment": null}, "number_of_quantity_installments": {"type": "integer", "index": 17, "name": "number_of_quantity_installments", "comment": null}, "number_of_revenue_installments": {"type": "integer", "index": 18, "name": "number_of_revenue_installments", "comment": null}, "product_code": {"type": "integer", "index": 19, "name": "product_code", "comment": null}, "quantity_installment_period": {"type": "integer", "index": 20, "name": "quantity_installment_period", "comment": null}, "quantity_schedule_type": {"type": "integer", "index": 21, "name": "quantity_schedule_type", "comment": null}, "quantity_unit_of_measure": {"type": "integer", "index": 22, "name": "quantity_unit_of_measure", "comment": null}, "record_type_id": {"type": "text", "index": 23, "name": "record_type_id", "comment": null}, "revenue_installment_period": {"type": "integer", "index": 24, "name": "revenue_installment_period", "comment": null}, "revenue_schedule_type": {"type": "integer", "index": 25, "name": "revenue_schedule_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.salesforce_source.stg_salesforce__product_2"}, "model.salesforce_source.stg_salesforce__task": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__task", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "task_id": {"type": "text", "index": 2, "name": "task_id", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "activity_date": {"type": "timestamp without time zone", "index": 4, "name": "activity_date", "comment": null}, "call_disposition": {"type": "integer", "index": 5, "name": "call_disposition", "comment": null}, "call_duration_in_seconds": {"type": "integer", "index": 6, "name": "call_duration_in_seconds", "comment": null}, "call_object": {"type": "integer", "index": 7, "name": "call_object", "comment": null}, "call_type": {"type": "integer", "index": 8, "name": "call_type", "comment": null}, "completed_date_time": {"type": "timestamp without time zone", "index": 9, "name": "completed_date_time", "comment": null}, "created_by_id": {"type": "text", "index": 10, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 11, "name": "created_date", "comment": null}, "task_description": {"type": "text", "index": 12, "name": "task_description", "comment": null}, "is_archived": {"type": "boolean", "index": 13, "name": "is_archived", "comment": null}, "is_closed": {"type": "boolean", "index": 14, "name": "is_closed", "comment": null}, "is_deleted": {"type": "boolean", "index": 15, "name": "is_deleted", "comment": null}, "is_high_priority": {"type": "boolean", "index": 16, "name": "is_high_priority", "comment": null}, "last_modified_by_id": {"type": "text", "index": 17, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 18, "name": "last_modified_date", "comment": null}, "owner_id": {"type": "text", "index": 19, "name": "owner_id", "comment": null}, "priority": {"type": "text", "index": 20, "name": "priority", "comment": null}, "record_type_id": {"type": "text", "index": 21, "name": "record_type_id", "comment": null}, "status": {"type": "text", "index": 22, "name": "status", "comment": null}, "subject": {"type": "text", "index": 23, "name": "subject", "comment": null}, "task_subtype": {"type": "text", "index": 24, "name": "task_subtype", "comment": null}, "type": {"type": "text", "index": 25, "name": "type", "comment": null}, "what_count": {"type": "integer", "index": 26, "name": "what_count", "comment": null}, "what_id": {"type": "text", "index": 27, "name": "what_id", "comment": null}, "who_count": {"type": "integer", "index": 28, "name": "who_count", "comment": null}, "who_id": {"type": "text", "index": 29, "name": "who_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.salesforce_source.stg_salesforce__task"}, "model.salesforce_source.stg_salesforce__user": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__user", "database": "postgres", "comment": null, "owner": "pguser"}, "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}, "account_id": {"type": "integer", "index": 3, "name": "account_id", "comment": null}, "alias": {"type": "text", "index": 4, "name": "alias", "comment": null}, "city": {"type": "integer", "index": 5, "name": "city", "comment": null}, "company_name": {"type": "integer", "index": 6, "name": "company_name", "comment": null}, "contact_id": {"type": "integer", "index": 7, "name": "contact_id", "comment": null}, "country": {"type": "text", "index": 8, "name": "country", "comment": null}, "country_code": {"type": "text", "index": 9, "name": "country_code", "comment": null}, "department": {"type": "integer", "index": 10, "name": "department", "comment": null}, "email": {"type": "text", "index": 11, "name": "email", "comment": null}, "first_name": {"type": "text", "index": 12, "name": "first_name", "comment": null}, "user_id": {"type": "text", "index": 13, "name": "user_id", "comment": null}, "individual_id": {"type": "integer", "index": 14, "name": "individual_id", "comment": null}, "is_active": {"type": "boolean", "index": 15, "name": "is_active", "comment": null}, "last_login_date": {"type": "timestamp without time zone", "index": 16, "name": "last_login_date", "comment": null}, "last_name": {"type": "text", "index": 17, "name": "last_name", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 18, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 19, "name": "last_viewed_date", "comment": null}, "manager_id": {"type": "text", "index": 20, "name": "manager_id", "comment": null}, "user_name": {"type": "text", "index": 21, "name": "user_name", "comment": null}, "postal_code": {"type": "integer", "index": 22, "name": "postal_code", "comment": null}, "profile_id": {"type": "text", "index": 23, "name": "profile_id", "comment": null}, "state": {"type": "integer", "index": 24, "name": "state", "comment": null}, "state_code": {"type": "integer", "index": 25, "name": "state_code", "comment": null}, "street": {"type": "integer", "index": 26, "name": "street", "comment": null}, "title": {"type": "text", "index": 27, "name": "title", "comment": null}, "user_role_id": {"type": "text", "index": 28, "name": "user_role_id", "comment": null}, "user_type": {"type": "text", "index": 29, "name": "user_type", "comment": null}, "username": {"type": "text", "index": 30, "name": "username", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.salesforce_source.stg_salesforce__user"}, "model.salesforce_source.stg_salesforce__user_role": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__user_role", "database": "postgres", "comment": null, "owner": "pguser"}, "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}, "developer_name": {"type": "text", "index": 3, "name": "developer_name", "comment": null}, "user_role_id": {"type": "text", "index": 4, "name": "user_role_id", "comment": null}, "user_role_name": {"type": "text", "index": 5, "name": "user_role_name", "comment": null}, "opportunity_access_for_account_owner": {"type": "text", "index": 6, "name": "opportunity_access_for_account_owner", "comment": null}, "parent_role_id": {"type": "text", "index": 7, "name": "parent_role_id", "comment": null}, "rollup_description": {"type": "text", "index": 8, "name": "rollup_description", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.salesforce_source.stg_salesforce__user_role"}}, "sources": {"source.salesforce_source.salesforce.account": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_account_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_number": {"type": "integer", "index": 2, "name": "account_number", "comment": null}, "account_source": {"type": "text", "index": 3, "name": "account_source", "comment": null}, "annual_revenue": {"type": "double precision", "index": 4, "name": "annual_revenue", "comment": null}, "billing_city": {"type": "text", "index": 5, "name": "billing_city", "comment": null}, "billing_country": {"type": "text", "index": 6, "name": "billing_country", "comment": null}, "billing_country_code": {"type": "text", "index": 7, "name": "billing_country_code", "comment": null}, "billing_geocode_accuracy": {"type": "integer", "index": 8, "name": "billing_geocode_accuracy", "comment": null}, "billing_latitude": {"type": "double precision", "index": 9, "name": "billing_latitude", "comment": null}, "billing_longitude": {"type": "double precision", "index": 10, "name": "billing_longitude", "comment": null}, "billing_postal_code": {"type": "text", "index": 11, "name": "billing_postal_code", "comment": null}, "billing_state": {"type": "text", "index": 12, "name": "billing_state", "comment": null}, "billing_state_code": {"type": "text", "index": 13, "name": "billing_state_code", "comment": null}, "billing_street": {"type": "text", "index": 14, "name": "billing_street", "comment": null}, "description": {"type": "text", "index": 15, "name": "description", "comment": null}, "fax": {"type": "integer", "index": 16, "name": "fax", "comment": null}, "id": {"type": "text", "index": 17, "name": "id", "comment": null}, "industry": {"type": "text", "index": 18, "name": "industry", "comment": null}, "is_deleted": {"type": "boolean", "index": 19, "name": "is_deleted", "comment": null}, "jigsaw_company_id": {"type": "integer", "index": 20, "name": "jigsaw_company_id", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 21, "name": "last_activity_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 22, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 23, "name": "last_viewed_date", "comment": null}, "master_record_id": {"type": "text", "index": 24, "name": "master_record_id", "comment": null}, "name": {"type": "text", "index": 25, "name": "name", "comment": null}, "number_of_employees": {"type": "integer", "index": 26, "name": "number_of_employees", "comment": null}, "owner_id": {"type": "text", "index": 27, "name": "owner_id", "comment": null}, "ownership": {"type": "integer", "index": 28, "name": "ownership", "comment": null}, "parent_id": {"type": "integer", "index": 29, "name": "parent_id", "comment": null}, "phone": {"type": "text", "index": 30, "name": "phone", "comment": null}, "photo_url": {"type": "text", "index": 31, "name": "photo_url", "comment": null}, "rating": {"type": "integer", "index": 32, "name": "rating", "comment": null}, "record_type_id": {"type": "text", "index": 33, "name": "record_type_id", "comment": null}, "shipping_city": {"type": "integer", "index": 34, "name": "shipping_city", "comment": null}, "shipping_country": {"type": "text", "index": 35, "name": "shipping_country", "comment": null}, "shipping_country_code": {"type": "text", "index": 36, "name": "shipping_country_code", "comment": null}, "shipping_geocode_accuracy": {"type": "integer", "index": 37, "name": "shipping_geocode_accuracy", "comment": null}, "shipping_latitude": {"type": "double precision", "index": 38, "name": "shipping_latitude", "comment": null}, "shipping_longitude": {"type": "double precision", "index": 39, "name": "shipping_longitude", "comment": null}, "shipping_postal_code": {"type": "integer", "index": 40, "name": "shipping_postal_code", "comment": null}, "shipping_state": {"type": "integer", "index": 41, "name": "shipping_state", "comment": null}, "shipping_state_code": {"type": "integer", "index": 42, "name": "shipping_state_code", "comment": null}, "shipping_street": {"type": "integer", "index": 43, "name": "shipping_street", "comment": null}, "sic": {"type": "integer", "index": 44, "name": "sic", "comment": null}, "sic_desc": {"type": "integer", "index": 45, "name": "sic_desc", "comment": null}, "site": {"type": "integer", "index": 46, "name": "site", "comment": null}, "ticker_symbol": {"type": "integer", "index": 47, "name": "ticker_symbol", "comment": null}, "type": {"type": "text", "index": 48, "name": "type", "comment": null}, "website": {"type": "text", "index": 49, "name": "website", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 50, "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.salesforce_source.salesforce.account"}, "source.salesforce_source.salesforce_history.account": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_account_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_active": {"type": "boolean", "index": 1, "name": "_fivetran_active", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_end", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "account_number": {"type": "integer", "index": 5, "name": "account_number", "comment": null}, "account_source": {"type": "text", "index": 6, "name": "account_source", "comment": null}, "annual_revenue": {"type": "double precision", "index": 7, "name": "annual_revenue", "comment": null}, "billing_city": {"type": "text", "index": 8, "name": "billing_city", "comment": null}, "billing_country": {"type": "text", "index": 9, "name": "billing_country", "comment": null}, "billing_postal_code": {"type": "text", "index": 10, "name": "billing_postal_code", "comment": null}, "billing_state": {"type": "text", "index": 11, "name": "billing_state", "comment": null}, "billing_street": {"type": "text", "index": 12, "name": "billing_street", "comment": null}, "description": {"type": "text", "index": 13, "name": "description", "comment": null}, "id": {"type": "text", "index": 14, "name": "id", "comment": null}, "industry": {"type": "text", "index": 15, "name": "industry", "comment": null}, "is_deleted": {"type": "boolean", "index": 16, "name": "is_deleted", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 17, "name": "last_activity_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 18, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 19, "name": "last_viewed_date", "comment": null}, "master_record_id": {"type": "text", "index": 20, "name": "master_record_id", "comment": null}, "name": {"type": "text", "index": 21, "name": "name", "comment": null}, "number_of_employees": {"type": "integer", "index": 22, "name": "number_of_employees", "comment": null}, "owner_id": {"type": "text", "index": 23, "name": "owner_id", "comment": null}, "ownership": {"type": "integer", "index": 24, "name": "ownership", "comment": null}, "parent_id": {"type": "integer", "index": 25, "name": "parent_id", "comment": null}, "rating": {"type": "integer", "index": 26, "name": "rating", "comment": null}, "record_type_id": {"type": "text", "index": 27, "name": "record_type_id", "comment": null}, "shipping_city": {"type": "integer", "index": 28, "name": "shipping_city", "comment": null}, "shipping_country": {"type": "text", "index": 29, "name": "shipping_country", "comment": null}, "shipping_postal_code": {"type": "integer", "index": 30, "name": "shipping_postal_code", "comment": null}, "shipping_state": {"type": "integer", "index": 31, "name": "shipping_state", "comment": null}, "shipping_street": {"type": "integer", "index": 32, "name": "shipping_street", "comment": null}, "type": {"type": "text", "index": 33, "name": "type", "comment": null}, "website": {"type": "text", "index": 34, "name": "website", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.salesforce_source.salesforce_history.account"}, "source.salesforce_source.salesforce.contact": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_contact_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "cbit_clearbit_c": {"type": "text", "index": 4, "name": "cbit_clearbit_c", "comment": null}, "cbit_clearbit_ready_c": {"type": "boolean", "index": 5, "name": "cbit_clearbit_ready_c", "comment": null}, "created_by_id": {"type": "text", "index": 6, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 7, "name": "created_date", "comment": null}, "department": {"type": "integer", "index": 8, "name": "department", "comment": null}, "email": {"type": "text", "index": 9, "name": "email", "comment": null}, "email_bounced_date": {"type": "timestamp without time zone", "index": 10, "name": "email_bounced_date", "comment": null}, "email_bounced_reason": {"type": "integer", "index": 11, "name": "email_bounced_reason", "comment": null}, "fax": {"type": "integer", "index": 12, "name": "fax", "comment": null}, "first_name": {"type": "text", "index": 13, "name": "first_name", "comment": null}, "is_deleted": {"type": "boolean", "index": 14, "name": "is_deleted", "comment": null}, "is_email_bounced": {"type": "boolean", "index": 15, "name": "is_email_bounced", "comment": null}, "jigsaw_contact_id": {"type": "integer", "index": 16, "name": "jigsaw_contact_id", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 17, "name": "last_activity_date", "comment": null}, "last_curequest_date": {"type": "timestamp without time zone", "index": 18, "name": "last_curequest_date", "comment": null}, "last_cuupdate_date": {"type": "timestamp without time zone", "index": 19, "name": "last_cuupdate_date", "comment": null}, "last_modified_by_id": {"type": "text", "index": 20, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 21, "name": "last_modified_date", "comment": null}, "last_name": {"type": "text", "index": 22, "name": "last_name", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 23, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 24, "name": "last_viewed_date", "comment": null}, "mailing_city": {"type": "text", "index": 25, "name": "mailing_city", "comment": null}, "mailing_country": {"type": "text", "index": 26, "name": "mailing_country", "comment": null}, "mailing_country_code": {"type": "text", "index": 27, "name": "mailing_country_code", "comment": null}, "mailing_geocode_accuracy": {"type": "integer", "index": 28, "name": "mailing_geocode_accuracy", "comment": null}, "mailing_latitude": {"type": "integer", "index": 29, "name": "mailing_latitude", "comment": null}, "mailing_longitude": {"type": "integer", "index": 30, "name": "mailing_longitude", "comment": null}, "mailing_postal_code": {"type": "integer", "index": 31, "name": "mailing_postal_code", "comment": null}, "mailing_state": {"type": "text", "index": 32, "name": "mailing_state", "comment": null}, "mailing_state_code": {"type": "text", "index": 33, "name": "mailing_state_code", "comment": null}, "mailing_street": {"type": "text", "index": 34, "name": "mailing_street", "comment": null}, "master_record_id": {"type": "integer", "index": 35, "name": "master_record_id", "comment": null}, "mc_4_sf_mc_subscriber_c": {"type": "integer", "index": 36, "name": "mc_4_sf_mc_subscriber_c", "comment": null}, "mobile_phone": {"type": "integer", "index": 37, "name": "mobile_phone", "comment": null}, "name": {"type": "text", "index": 38, "name": "name", "comment": null}, "owner_id": {"type": "text", "index": 39, "name": "owner_id", "comment": null}, "phone": {"type": "text", "index": 40, "name": "phone", "comment": null}, "photo_url": {"type": "text", "index": 41, "name": "photo_url", "comment": null}, "reports_to_id": {"type": "integer", "index": 42, "name": "reports_to_id", "comment": null}, "salutation": {"type": "integer", "index": 43, "name": "salutation", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 44, "name": "system_modstamp", "comment": null}, "title": {"type": "text", "index": 45, "name": "title", "comment": null}, "email_bounced_c": {"type": "boolean", "index": 46, "name": "email_bounced_c", "comment": null}, "email_quality_unknown_c": {"type": "boolean", "index": 47, "name": "email_quality_unknown_c", "comment": null}, "gclid_c": {"type": "integer", "index": 48, "name": "gclid_c", "comment": null}, "referral_account_c": {"type": "integer", "index": 49, "name": "referral_account_c", "comment": null}, "referral_contact_c": {"type": "integer", "index": 50, "name": "referral_contact_c", "comment": null}, "has_opted_out_of_email": {"type": "boolean", "index": 51, "name": "has_opted_out_of_email", "comment": null}, "act_on_lead_score_c": {"type": "integer", "index": 52, "name": "act_on_lead_score_c", "comment": null}, "cbit_created_by_clearbit_c": {"type": "boolean", "index": 53, "name": "cbit_created_by_clearbit_c", "comment": null}, "fivetran_user_id_c": {"type": "integer", "index": 54, "name": "fivetran_user_id_c", "comment": null}, "no_longer_at_company_c": {"type": "boolean", "index": 55, "name": "no_longer_at_company_c", "comment": null}, "pi_campaign_c": {"type": "text", "index": 56, "name": "pi_campaign_c", "comment": null}, "pi_comments_c": {"type": "integer", "index": 57, "name": "pi_comments_c", "comment": null}, "pi_conversion_date_c": {"type": "integer", "index": 58, "name": "pi_conversion_date_c", "comment": null}, "pi_conversion_object_name_c": {"type": "integer", "index": 59, "name": "pi_conversion_object_name_c", "comment": null}, "pi_conversion_object_type_c": {"type": "integer", "index": 60, "name": "pi_conversion_object_type_c", "comment": null}, "pi_created_date_c": {"type": "timestamp without time zone", "index": 61, "name": "pi_created_date_c", "comment": null}, "pi_first_activity_c": {"type": "integer", "index": 62, "name": "pi_first_activity_c", "comment": null}, "pi_first_search_term_c": {"type": "integer", "index": 63, "name": "pi_first_search_term_c", "comment": null}, "pi_first_search_type_c": {"type": "integer", "index": 64, "name": "pi_first_search_type_c", "comment": null}, "pi_first_touch_url_c": {"type": "integer", "index": 65, "name": "pi_first_touch_url_c", "comment": null}, "pi_grade_c": {"type": "integer", "index": 66, "name": "pi_grade_c", "comment": null}, "pi_last_activity_c": {"type": "integer", "index": 67, "name": "pi_last_activity_c", "comment": null}, "pi_needs_score_synced_c": {"type": "boolean", "index": 68, "name": "pi_needs_score_synced_c", "comment": null}, "pi_notes_c": {"type": "integer", "index": 69, "name": "pi_notes_c", "comment": null}, "pi_pardot_hard_bounced_c": {"type": "boolean", "index": 70, "name": "pi_pardot_hard_bounced_c", "comment": null}, "pi_pardot_last_scored_at_c": {"type": "integer", "index": 71, "name": "pi_pardot_last_scored_at_c", "comment": null}, "pi_score_c": {"type": "integer", "index": 72, "name": "pi_score_c", "comment": null}, "pi_url_c": {"type": "text", "index": 73, "name": "pi_url_c", "comment": null}, "pi_utm_campaign_c": {"type": "integer", "index": 74, "name": "pi_utm_campaign_c", "comment": null}, "pi_utm_content_c": {"type": "integer", "index": 75, "name": "pi_utm_content_c", "comment": null}, "pi_utm_medium_c": {"type": "integer", "index": 76, "name": "pi_utm_medium_c", "comment": null}, "pi_utm_source_c": {"type": "integer", "index": 77, "name": "pi_utm_source_c", "comment": null}, "pi_utm_term_c": {"type": "integer", "index": 78, "name": "pi_utm_term_c", "comment": null}, "lead_source": {"type": "text", "index": 79, "name": "lead_source", "comment": null}, "contact_status_c": {"type": "text", "index": 80, "name": "contact_status_c", "comment": null}, "region_c": {"type": "integer", "index": 81, "name": "region_c", "comment": null}, "competitor_c": {"type": "integer", "index": 82, "name": "competitor_c", "comment": null}, "bt_stripe_gender_c": {"type": "integer", "index": 83, "name": "bt_stripe_gender_c", "comment": null}, "bt_stripe_ssn_last_4_encrypted_c": {"type": "integer", "index": 84, "name": "bt_stripe_ssn_last_4_encrypted_c", "comment": null}, "bt_stripe_personal_id_number_c": {"type": "integer", "index": 85, "name": "bt_stripe_personal_id_number_c", "comment": null}, "bt_stripe_personal_id_number_encrypted_c": {"type": "integer", "index": 86, "name": "bt_stripe_personal_id_number_encrypted_c", "comment": null}, "bt_stripe_maiden_name_c": {"type": "integer", "index": 87, "name": "bt_stripe_maiden_name_c", "comment": null}, "bt_stripe_languages_c": {"type": "integer", "index": 88, "name": "bt_stripe_languages_c", "comment": null}, "bt_stripe_default_payment_method_c": {"type": "integer", "index": 89, "name": "bt_stripe_default_payment_method_c", "comment": null}, "bt_stripe_ssn_last_4_c": {"type": "integer", "index": 90, "name": "bt_stripe_ssn_last_4_c", "comment": null}, "bt_stripe_personal_id_type_c": {"type": "integer", "index": 91, "name": "bt_stripe_personal_id_type_c", "comment": null}, "bt_stripe_default_payment_gateway_c": {"type": "integer", "index": 92, "name": "bt_stripe_default_payment_gateway_c", "comment": null}, "bt_stripe_level_c": {"type": "integer", "index": 93, "name": "bt_stripe_level_c", "comment": null}, "lean_data_routing_action_c": {"type": "text", "index": 94, "name": "lean_data_routing_action_c", "comment": null}, "lean_data_matched_buyer_persona_c": {"type": "integer", "index": 95, "name": "lean_data_matched_buyer_persona_c", "comment": null}, "lean_data_ld_segment_c": {"type": "integer", "index": 96, "name": "lean_data_ld_segment_c", "comment": null}, "lean_data_tag_c": {"type": "integer", "index": 97, "name": "lean_data_tag_c", "comment": null}, "lean_data_modified_score_c": {"type": "integer", "index": 98, "name": "lean_data_modified_score_c", "comment": null}, "do_not_route_lead_c": {"type": "boolean", "index": 99, "name": "do_not_route_lead_c", "comment": null}, "technical_contact_c": {"type": "integer", "index": 100, "name": "technical_contact_c", "comment": null}, "allbound_id_c": {"type": "integer", "index": 101, "name": "allbound_id_c", "comment": null}, "notes_c": {"type": "integer", "index": 102, "name": "notes_c", "comment": null}, "netsuite_conn_sync_in_progress_c": {"type": "boolean", "index": 103, "name": "netsuite_conn_sync_in_progress_c", "comment": null}, "netsuite_conn_celigo_update_c": {"type": "boolean", "index": 104, "name": "netsuite_conn_celigo_update_c", "comment": null}, "netsuite_conn_net_suite_id_c": {"type": "integer", "index": 105, "name": "netsuite_conn_net_suite_id_c", "comment": null}, "netsuite_conn_net_suite_sync_err_c": {"type": "integer", "index": 106, "name": "netsuite_conn_net_suite_sync_err_c", "comment": null}, "netsuite_conn_push_to_net_suite_c": {"type": "boolean", "index": 107, "name": "netsuite_conn_push_to_net_suite_c", "comment": null}, "netsuite_conn_pushed_from_opportunity_c": {"type": "boolean", "index": 108, "name": "netsuite_conn_pushed_from_opportunity_c", "comment": null}, "description": {"type": "text", "index": 109, "name": "description", "comment": null}, "lid_linked_in_company_id_c": {"type": "integer", "index": 110, "name": "lid_linked_in_company_id_c", "comment": null}, "lid_linked_in_member_token_c": {"type": "integer", "index": 111, "name": "lid_linked_in_member_token_c", "comment": null}, "is_eu_resident_c": {"type": "boolean", "index": 112, "name": "is_eu_resident_c", "comment": null}, "do_not_call": {"type": "boolean", "index": 113, "name": "do_not_call", "comment": null}, "sales_loft_1_most_recent_cadence_next_step_due_date_c": {"type": "integer", "index": 114, "name": "sales_loft_1_most_recent_cadence_next_step_due_date_c", "comment": null}, "sales_loft_1_most_recent_last_completed_step_c": {"type": "integer", "index": 115, "name": "sales_loft_1_most_recent_last_completed_step_c", "comment": null}, "sales_loft_1_most_recent_cadence_name_c": {"type": "integer", "index": 116, "name": "sales_loft_1_most_recent_cadence_name_c", "comment": null}, "source_detail_c": {"type": "text", "index": 117, "name": "source_detail_c", "comment": null}, "utm_source_c": {"type": "integer", "index": 118, "name": "utm_source_c", "comment": null}, "utm_content_c": {"type": "integer", "index": 119, "name": "utm_content_c", "comment": null}, "utm_term_c": {"type": "integer", "index": 120, "name": "utm_term_c", "comment": null}, "utm_medium_c": {"type": "integer", "index": 121, "name": "utm_medium_c", "comment": null}, "utm_campaign_c": {"type": "integer", "index": 122, "name": "utm_campaign_c", "comment": null}, "network_c": {"type": "integer", "index": 123, "name": "network_c", "comment": null}, "matchtype_c": {"type": "integer", "index": 124, "name": "matchtype_c", "comment": null}, "device_c": {"type": "integer", "index": 125, "name": "device_c", "comment": null}, "creative_c": {"type": "integer", "index": 126, "name": "creative_c", "comment": null}, "adgroupid_c": {"type": "integer", "index": 127, "name": "adgroupid_c", "comment": null}, "keyword_c": {"type": "integer", "index": 128, "name": "keyword_c", "comment": null}, "campaignid_c": {"type": "integer", "index": 129, "name": "campaignid_c", "comment": null}, "partner_rep_email_c": {"type": "integer", "index": 130, "name": "partner_rep_email_c", "comment": null}, "partner_rep_name_c": {"type": "integer", "index": 131, "name": "partner_rep_name_c", "comment": null}, "contact_type_c": {"type": "integer", "index": 132, "name": "contact_type_c", "comment": null}, "old_lead_source_c": {"type": "integer", "index": 133, "name": "old_lead_source_c", "comment": null}, "old_lead_source_detail_c": {"type": "integer", "index": 134, "name": "old_lead_source_detail_c", "comment": null}, "contact_stage_c": {"type": "integer", "index": 135, "name": "contact_stage_c", "comment": null}, "original_utm_campaign_c": {"type": "integer", "index": 136, "name": "original_utm_campaign_c", "comment": null}, "original_utm_content_c": {"type": "integer", "index": 137, "name": "original_utm_content_c", "comment": null}, "original_utm_medium_c": {"type": "integer", "index": 138, "name": "original_utm_medium_c", "comment": null}, "original_utm_source_c": {"type": "integer", "index": 139, "name": "original_utm_source_c", "comment": null}, "original_utm_term_c": {"type": "integer", "index": 140, "name": "original_utm_term_c", "comment": null}, "es_app_escreated_timestamp_c": {"type": "integer", "index": 141, "name": "es_app_escreated_timestamp_c", "comment": null}, "es_app_esecid_c": {"type": "integer", "index": 142, "name": "es_app_esecid_c", "comment": null}, "es_app_esenriched_c": {"type": "integer", "index": 143, "name": "es_app_esenriched_c", "comment": null}, "es_app_esenriched_timestamp_c": {"type": "integer", "index": 144, "name": "es_app_esenriched_timestamp_c", "comment": null}, "es_app_esintent_aggregate_score_c": {"type": "integer", "index": 145, "name": "es_app_esintent_aggregate_score_c", "comment": null}, "es_app_esintent_timestamp_c": {"type": "integer", "index": 146, "name": "es_app_esintent_timestamp_c", "comment": null}, "es_app_esintent_topics_c": {"type": "integer", "index": 147, "name": "es_app_esintent_topics_c", "comment": null}, "es_app_esoverall_fit_score_c": {"type": "integer", "index": 148, "name": "es_app_esoverall_fit_score_c", "comment": null}, "es_app_essource_c": {"type": "integer", "index": 149, "name": "es_app_essource_c", "comment": null}, "individual_id": {"type": "integer", "index": 150, "name": "individual_id", "comment": null}, "marketing_process_c": {"type": "integer", "index": 151, "name": "marketing_process_c", "comment": null}, "automation_tracking_c": {"type": "integer", "index": 152, "name": "automation_tracking_c", "comment": null}, "user_gems_has_changed_job_c": {"type": "integer", "index": 153, "name": "user_gems_has_changed_job_c", "comment": null}, "email_opt_in_explicit_c": {"type": "integer", "index": 154, "name": "email_opt_in_explicit_c", "comment": null}, "email_opt_in_implicit_c": {"type": "integer", "index": 155, "name": "email_opt_in_implicit_c", "comment": null}, "gdpr_opt_in_explicit_c": {"type": "integer", "index": 156, "name": "gdpr_opt_in_explicit_c", "comment": null}, "user_gems_is_a_user_gem_c": {"type": "integer", "index": 157, "name": "user_gems_is_a_user_gem_c", "comment": null}, "user_gems_past_account_c": {"type": "integer", "index": 158, "name": "user_gems_past_account_c", "comment": null}, "user_gems_past_company_c": {"type": "integer", "index": 159, "name": "user_gems_past_company_c", "comment": null}, "user_gems_past_contact_c": {"type": "integer", "index": 160, "name": "user_gems_past_contact_c", "comment": null}, "user_gems_past_title_c": {"type": "integer", "index": 161, "name": "user_gems_past_title_c", "comment": null}, "partner_contact_c": {"type": "integer", "index": 162, "name": "partner_contact_c", "comment": null}, "promotion_id_c": {"type": "integer", "index": 163, "name": "promotion_id_c", "comment": null}, "referral_exists_c": {"type": "integer", "index": 164, "name": "referral_exists_c", "comment": null}, "referral_first_name_c": {"type": "integer", "index": 165, "name": "referral_first_name_c", "comment": null}, "referral_last_name_c": {"type": "integer", "index": 166, "name": "referral_last_name_c", "comment": null}, "mkto_71_contact_acquisition_date_c": {"type": "integer", "index": 167, "name": "mkto_71_contact_acquisition_date_c", "comment": null}, "mkto_71_contact_acquisition_program_c": {"type": "integer", "index": 168, "name": "mkto_71_contact_acquisition_program_c", "comment": null}, "mkto_71_contact_acquisition_program_id_c": {"type": "integer", "index": 169, "name": "mkto_71_contact_acquisition_program_id_c", "comment": null}, "mkto_71_contact_inferred_city_c": {"type": "integer", "index": 170, "name": "mkto_71_contact_inferred_city_c", "comment": null}, "mkto_71_contact_inferred_company_c": {"type": "integer", "index": 171, "name": "mkto_71_contact_inferred_company_c", "comment": null}, "mkto_71_contact_inferred_country_c": {"type": "integer", "index": 172, "name": "mkto_71_contact_inferred_country_c", "comment": null}, "mkto_71_contact_inferred_metropolitan_a_c": {"type": "integer", "index": 173, "name": "mkto_71_contact_inferred_metropolitan_a_c", "comment": null}, "mkto_71_contact_inferred_phone_area_cod_c": {"type": "integer", "index": 174, "name": "mkto_71_contact_inferred_phone_area_cod_c", "comment": null}, "mkto_71_contact_inferred_postal_code_c": {"type": "integer", "index": 175, "name": "mkto_71_contact_inferred_postal_code_c", "comment": null}, "mkto_71_contact_inferred_state_region_c": {"type": "integer", "index": 176, "name": "mkto_71_contact_inferred_state_region_c", "comment": null}, "mkto_71_contact_lead_score_c": {"type": "integer", "index": 177, "name": "mkto_71_contact_lead_score_c", "comment": null}, "mkto_71_contact_original_referrer_c": {"type": "integer", "index": 178, "name": "mkto_71_contact_original_referrer_c", "comment": null}, "mkto_71_contact_original_search_engine_c": {"type": "integer", "index": 179, "name": "mkto_71_contact_original_search_engine_c", "comment": null}, "mkto_71_contact_original_search_phrase_c": {"type": "integer", "index": 180, "name": "mkto_71_contact_original_search_phrase_c", "comment": null}, "mkto_71_contact_original_source_info_c": {"type": "integer", "index": 181, "name": "mkto_71_contact_original_source_info_c", "comment": null}, "mkto_71_contact_original_source_type_c": {"type": "integer", "index": 182, "name": "mkto_71_contact_original_source_type_c", "comment": null}, "mkto_si_hide_date_c": {"type": "integer", "index": 183, "name": "mkto_si_hide_date_c", "comment": null}, "mkto_si_last_interesting_moment_date_c": {"type": "integer", "index": 184, "name": "mkto_si_last_interesting_moment_date_c", "comment": null}, "mkto_si_last_interesting_moment_desc_c": {"type": "integer", "index": 185, "name": "mkto_si_last_interesting_moment_desc_c", "comment": null}, "mkto_si_last_interesting_moment_source_c": {"type": "integer", "index": 186, "name": "mkto_si_last_interesting_moment_source_c", "comment": null}, "mkto_si_last_interesting_moment_type_c": {"type": "integer", "index": 187, "name": "mkto_si_last_interesting_moment_type_c", "comment": null}, "mkto_si_mkto_lead_score_c": {"type": "integer", "index": 188, "name": "mkto_si_mkto_lead_score_c", "comment": null}, "mkto_si_priority_c": {"type": "integer", "index": 189, "name": "mkto_si_priority_c", "comment": null}, "mkto_si_relative_score_value_c": {"type": "integer", "index": 190, "name": "mkto_si_relative_score_value_c", "comment": null}, "mkto_si_urgency_value_c": {"type": "integer", "index": 191, "name": "mkto_si_urgency_value_c", "comment": null}, "cloudingo_agent_ces_c": {"type": "integer", "index": 192, "name": "cloudingo_agent_ces_c", "comment": null}, "cloudingo_agent_mar_c": {"type": "integer", "index": 193, "name": "cloudingo_agent_mar_c", "comment": null}, "cloudingo_agent_mas_c": {"type": "integer", "index": 194, "name": "cloudingo_agent_mas_c", "comment": null}, "cloudingo_agent_mav_c": {"type": "integer", "index": 195, "name": "cloudingo_agent_mav_c", "comment": null}, "cloudingo_agent_mrdi_c": {"type": "integer", "index": 196, "name": "cloudingo_agent_mrdi_c", "comment": null}, "cloudingo_agent_mtz_c": {"type": "integer", "index": 197, "name": "cloudingo_agent_mtz_c", "comment": null}, "cloudingo_agent_oar_c": {"type": "integer", "index": 198, "name": "cloudingo_agent_oar_c", "comment": null}, "cloudingo_agent_oas_c": {"type": "integer", "index": 199, "name": "cloudingo_agent_oas_c", "comment": null}, "cloudingo_agent_oav_c": {"type": "integer", "index": 200, "name": "cloudingo_agent_oav_c", "comment": null}, "cloudingo_agent_ordi_c": {"type": "integer", "index": 201, "name": "cloudingo_agent_ordi_c", "comment": null}, "cloudingo_agent_otz_c": {"type": "integer", "index": 202, "name": "cloudingo_agent_otz_c", "comment": null}, "do_not_sync_marketo_c": {"type": "integer", "index": 203, "name": "do_not_sync_marketo_c", "comment": null}, "phone_extension_c": {"type": "integer", "index": 204, "name": "phone_extension_c", "comment": null}, "job_function_c": {"type": "integer", "index": 205, "name": "job_function_c", "comment": null}, "job_level_c": {"type": "integer", "index": 206, "name": "job_level_c", "comment": null}, "direct_office_c": {"type": "integer", "index": 207, "name": "direct_office_c", "comment": null}, "city_c": {"type": "integer", "index": 208, "name": "city_c", "comment": null}, "country_c": {"type": "integer", "index": 209, "name": "country_c", "comment": null}, "state_c": {"type": "integer", "index": 210, "name": "state_c", "comment": null}, "secondary_email_c": {"type": "integer", "index": 211, "name": "secondary_email_c", "comment": null}, "es_seniority_c": {"type": "integer", "index": 212, "name": "es_seniority_c", "comment": null}, "source_last_lead_source_c": {"type": "integer", "index": 213, "name": "source_last_lead_source_c", "comment": null}, "source_last_lead_source_category_c": {"type": "integer", "index": 214, "name": "source_last_lead_source_category_c", "comment": null}, "source_last_lead_source_detail_c": {"type": "integer", "index": 215, "name": "source_last_lead_source_detail_c", "comment": null}, "drift_cql_c": {"type": "integer", "index": 216, "name": "drift_cql_c", "comment": null}, "hot_contact_c": {"type": "integer", "index": 217, "name": "hot_contact_c", "comment": null}, "behavioral_score_c": {"type": "integer", "index": 218, "name": "behavioral_score_c", "comment": null}, "unique_email_c": {"type": "integer", "index": 219, "name": "unique_email_c", "comment": null}, "is_emea_event_routing_c": {"type": "integer", "index": 220, "name": "is_emea_event_routing_c", "comment": null}, "csi_code_c": {"type": "integer", "index": 221, "name": "csi_code_c", "comment": null}, "clearbit_role_c": {"type": "integer", "index": 222, "name": "clearbit_role_c", "comment": null}, "clearbit_seniority_c": {"type": "integer", "index": 223, "name": "clearbit_seniority_c", "comment": null}, "clearbit_sub_role_c": {"type": "integer", "index": 224, "name": "clearbit_sub_role_c", "comment": null}, "rh_2_currency_test_c": {"type": "integer", "index": 225, "name": "rh_2_currency_test_c", "comment": null}, "rh_2_describe_c": {"type": "integer", "index": 226, "name": "rh_2_describe_c", "comment": null}, "rh_2_integer_test_c": {"type": "integer", "index": 227, "name": "rh_2_integer_test_c", "comment": null}, "created_by_role_c": {"type": "integer", "index": 228, "name": "created_by_role_c", "comment": null}, "demographic_score_c": {"type": "integer", "index": 229, "name": "demographic_score_c", "comment": null}, "country_code_c": {"type": "integer", "index": 230, "name": "country_code_c", "comment": null}, "state_code_c": {"type": "integer", "index": 231, "name": "state_code_c", "comment": null}, "attended_event_c": {"type": "integer", "index": 232, "name": "attended_event_c", "comment": null}, "zoominfo_technologies_c": {"type": "integer", "index": 233, "name": "zoominfo_technologies_c", "comment": null}, "mql_date_c": {"type": "integer", "index": 234, "name": "mql_date_c", "comment": null}, "user_gems_user_gems_id_c": {"type": "integer", "index": 235, "name": "user_gems_user_gems_id_c", "comment": null}, "dozisf_zoom_info_company_id_c": {"type": "integer", "index": 236, "name": "dozisf_zoom_info_company_id_c", "comment": null}, "dozisf_zoom_info_first_updated_c": {"type": "integer", "index": 237, "name": "dozisf_zoom_info_first_updated_c", "comment": null}, "dozisf_zoom_info_id_c": {"type": "integer", "index": 238, "name": "dozisf_zoom_info_id_c", "comment": null}, "dozisf_zoom_info_last_updated_c": {"type": "integer", "index": 239, "name": "dozisf_zoom_info_last_updated_c", "comment": null}, "lean_data_manual_route_trigger_c": {"type": "integer", "index": 240, "name": "lean_data_manual_route_trigger_c", "comment": null}, "first_mql_date_c": {"type": "integer", "index": 241, "name": "first_mql_date_c", "comment": null}, "active_relationship_c": {"type": "integer", "index": 242, "name": "active_relationship_c", "comment": null}, "clarus_date_c": {"type": "integer", "index": 243, "name": "clarus_date_c", "comment": null}, "clarus_editor_c": {"type": "integer", "index": 244, "name": "clarus_editor_c", "comment": null}, "clarus_notes_c": {"type": "integer", "index": 245, "name": "clarus_notes_c", "comment": null}, "clarus_project_c": {"type": "integer", "index": 246, "name": "clarus_project_c", "comment": null}, "clarus_status_c": {"type": "integer", "index": 247, "name": "clarus_status_c", "comment": null}, "historical_contact_status_c": {"type": "integer", "index": 248, "name": "historical_contact_status_c", "comment": null}, "fivetran_account_association_date_c": {"type": "integer", "index": 249, "name": "fivetran_account_association_date_c", "comment": null}, "fivetran_account_user_role_s_c": {"type": "integer", "index": 250, "name": "fivetran_account_user_role_s_c", "comment": null}, "mql_reason_c": {"type": "integer", "index": 251, "name": "mql_reason_c", "comment": null}, "attempting_contact_date_time_c": {"type": "integer", "index": 252, "name": "attempting_contact_date_time_c", "comment": null}, "linked_in_url_c": {"type": "integer", "index": 253, "name": "linked_in_url_c", "comment": null}, "trial_contact_start_date_c": {"type": "integer", "index": 254, "name": "trial_contact_start_date_c", "comment": null}, "contact_holdover_c": {"type": "integer", "index": 255, "name": "contact_holdover_c", "comment": null}, "bill_to_contact_hidden_c": {"type": "integer", "index": 256, "name": "bill_to_contact_hidden_c", "comment": null}, "enrichment_request_c": {"type": "integer", "index": 257, "name": "enrichment_request_c", "comment": null}, "meta_data_create_date_c": {"type": "integer", "index": 258, "name": "meta_data_create_date_c", "comment": null}, "primary_se_c": {"type": "integer", "index": 259, "name": "primary_se_c", "comment": null}, "unqualified_reason_c": {"type": "integer", "index": 260, "name": "unqualified_reason_c", "comment": null}, "opp_handoff_ae_c": {"type": "integer", "index": 261, "name": "opp_handoff_ae_c", "comment": null}, "marketing_connector_interest_c": {"type": "integer", "index": 262, "name": "marketing_connector_interest_c", "comment": null}, "recent_marketing_campaign_status_c": {"type": "integer", "index": 263, "name": "recent_marketing_campaign_status_c", "comment": null}, "salesloft_cadence_trigger_c": {"type": "integer", "index": 264, "name": "salesloft_cadence_trigger_c", "comment": null}, "last_ae_activity_owner_c": {"type": "integer", "index": 265, "name": "last_ae_activity_owner_c", "comment": null}, "last_bdr_activity_owner_c": {"type": "integer", "index": 266, "name": "last_bdr_activity_owner_c", "comment": null}, "last_manual_ae_activity_date_c": {"type": "integer", "index": 267, "name": "last_manual_ae_activity_date_c", "comment": null}, "last_manual_bdr_activity_date_c": {"type": "integer", "index": 268, "name": "last_manual_bdr_activity_date_c", "comment": null}, "leandata_contact_owner_override_c": {"type": "integer", "index": 269, "name": "leandata_contact_owner_override_c", "comment": null}, "potential_fivetran_use_case_c": {"type": "integer", "index": 270, "name": "potential_fivetran_use_case_c", "comment": null}, "lean_data_router_completion_date_time_c": {"type": "integer", "index": 271, "name": "lean_data_router_completion_date_time_c", "comment": null}, "partner_territory_c": {"type": "integer", "index": 272, "name": "partner_territory_c", "comment": null}, "partner_company_c": {"type": "integer", "index": 273, "name": "partner_company_c", "comment": null}, "bizible_2_ad_campaign_name_ft_c": {"type": "integer", "index": 274, "name": "bizible_2_ad_campaign_name_ft_c", "comment": null}, "bizible_2_ad_campaign_name_lc_c": {"type": "integer", "index": 275, "name": "bizible_2_ad_campaign_name_lc_c", "comment": null}, "bizible_2_bizible_id_c": {"type": "integer", "index": 276, "name": "bizible_2_bizible_id_c", "comment": null}, "bizible_2_landing_page_ft_c": {"type": "integer", "index": 277, "name": "bizible_2_landing_page_ft_c", "comment": null}, "bizible_2_landing_page_lc_c": {"type": "integer", "index": 278, "name": "bizible_2_landing_page_lc_c", "comment": null}, "bizible_2_marketing_channel_ft_c": {"type": "integer", "index": 279, "name": "bizible_2_marketing_channel_ft_c", "comment": null}, "bizible_2_marketing_channel_lc_c": {"type": "integer", "index": 280, "name": "bizible_2_marketing_channel_lc_c", "comment": null}, "bizible_2_touchpoint_date_ft_c": {"type": "integer", "index": 281, "name": "bizible_2_touchpoint_date_ft_c", "comment": null}, "bizible_2_touchpoint_date_lc_c": {"type": "integer", "index": 282, "name": "bizible_2_touchpoint_date_lc_c", "comment": null}, "bizible_2_touchpoint_source_ft_c": {"type": "integer", "index": 283, "name": "bizible_2_touchpoint_source_ft_c", "comment": null}, "bizible_2_touchpoint_source_lc_c": {"type": "integer", "index": 284, "name": "bizible_2_touchpoint_source_lc_c", "comment": null}, "sales_email_opt_out_c": {"type": "integer", "index": 285, "name": "sales_email_opt_out_c", "comment": null}, "sales_email_opt_out_date_time_c": {"type": "integer", "index": 286, "name": "sales_email_opt_out_date_time_c", "comment": null}, "celigo_sfnsio_net_suite_id_c": {"type": "integer", "index": 287, "name": "celigo_sfnsio_net_suite_id_c", "comment": null}, "celigo_sfnsio_net_suite_record_c": {"type": "integer", "index": 288, "name": "celigo_sfnsio_net_suite_record_c", "comment": null}, "celigo_sfnsio_net_suite_sync_error_c": {"type": "integer", "index": 289, "name": "celigo_sfnsio_net_suite_sync_error_c", "comment": null}, "celigo_sfnsio_skip_export_to_net_suite_c": {"type": "integer", "index": 290, "name": "celigo_sfnsio_skip_export_to_net_suite_c", "comment": null}, "celigo_sfnsio_test_mode_record_c": {"type": "integer", "index": 291, "name": "celigo_sfnsio_test_mode_record_c", "comment": null}, "ironclad_workflow_c": {"type": "integer", "index": 292, "name": "ironclad_workflow_c", "comment": null}, "last_sales_activity_date_time_c": {"type": "integer", "index": 293, "name": "last_sales_activity_date_time_c", "comment": null}, "user_activity_logged_by_c": {"type": "integer", "index": 294, "name": "user_activity_logged_by_c", "comment": null}, "first_activity_after_mql_date_c": {"type": "integer", "index": 295, "name": "first_activity_after_mql_date_c", "comment": null}, "last_sdr_activity_owner_c": {"type": "integer", "index": 296, "name": "last_sdr_activity_owner_c", "comment": null}, "last_sdr_activity_date_c": {"type": "integer", "index": 297, "name": "last_sdr_activity_date_c", "comment": null}, "beta_connector_interest_c": {"type": "integer", "index": 298, "name": "beta_connector_interest_c", "comment": null}, "first_manual_activity_after_mql_date_c": {"type": "integer", "index": 299, "name": "first_manual_activity_after_mql_date_c", "comment": null}, "user_gems_ug_past_infos_c": {"type": "integer", "index": 300, "name": "user_gems_ug_past_infos_c", "comment": null}, "user_gems_ug_current_infos_c": {"type": "integer", "index": 301, "name": "user_gems_ug_current_infos_c", "comment": null}, "user_gems_ug_created_by_ug_c": {"type": "integer", "index": 302, "name": "user_gems_ug_created_by_ug_c", "comment": null}, "free_trial_email_confirmed_date_c": {"type": "integer", "index": 303, "name": "free_trial_email_confirmed_date_c", "comment": null}, "routed_from_manual_bdr_ae_activity_c": {"type": "integer", "index": 304, "name": "routed_from_manual_bdr_ae_activity_c", "comment": null}, "dnboptimizer_dn_bcontact_record_c": {"type": "integer", "index": 305, "name": "dnboptimizer_dn_bcontact_record_c", "comment": null}, "i_sell_avention_id_c": {"type": "integer", "index": 306, "name": "i_sell_avention_id_c", "comment": null}, "persona_c": {"type": "integer", "index": 307, "name": "persona_c", "comment": null}, "last_marketing_interesting_moment_date_c": {"type": "integer", "index": 308, "name": "last_marketing_interesting_moment_date_c", "comment": null}, "verified_c": {"type": "integer", "index": 309, "name": "verified_c", "comment": null}, "salesloft_owner_c": {"type": "integer", "index": 310, "name": "salesloft_owner_c", "comment": null}, "salesloft_owner_sf_c": {"type": "integer", "index": 311, "name": "salesloft_owner_sf_c", "comment": null}, "email_opt_out_date_time_c": {"type": "integer", "index": 312, "name": "email_opt_out_date_time_c", "comment": null}, "pbf_startup_primary_role_c": {"type": "integer", "index": 313, "name": "pbf_startup_primary_role_c", "comment": null}, "pbf_startup_certify_eligibility_c": {"type": "integer", "index": 314, "name": "pbf_startup_certify_eligibility_c", "comment": null}, "engagio_intent_minutes_last_30_days_c": {"type": "integer", "index": 315, "name": "engagio_intent_minutes_last_30_days_c", "comment": null}, "engagio_engagement_minutes_last_3_months_c": {"type": "integer", "index": 316, "name": "engagio_engagement_minutes_last_3_months_c", "comment": null}, "engagio_engagement_minutes_last_7_days_c": {"type": "integer", "index": 317, "name": "engagio_engagement_minutes_last_7_days_c", "comment": null}, "engagio_first_engagement_date_c": {"type": "integer", "index": 318, "name": "engagio_first_engagement_date_c", "comment": null}, "engagio_department_c": {"type": "integer", "index": 319, "name": "engagio_department_c", "comment": null}, "engagio_role_c": {"type": "integer", "index": 320, "name": "engagio_role_c", "comment": null}, "mql_date_changed_c": {"type": "integer", "index": 321, "name": "mql_date_changed_c", "comment": null}, "first_activity_after_mql_changed_c": {"type": "integer", "index": 322, "name": "first_activity_after_mql_changed_c", "comment": null}, "birthdate": {"type": "timestamp without time zone", "index": 323, "name": "birthdate", "comment": null}, "legacy_hvr_id_c": {"type": "integer", "index": 324, "name": "legacy_hvr_id_c", "comment": null}, "has_opted_out_of_fax": {"type": "integer", "index": 325, "name": "has_opted_out_of_fax", "comment": null}, "other_latitude": {"type": "integer", "index": 326, "name": "other_latitude", "comment": null}, "username_c": {"type": "integer", "index": 327, "name": "username_c", "comment": null}, "assistant_name": {"type": "integer", "index": 328, "name": "assistant_name", "comment": null}, "created_at_c": {"type": "integer", "index": 329, "name": "created_at_c", "comment": null}, "partner_contact_deprecate_c": {"type": "integer", "index": 330, "name": "partner_contact_deprecate_c", "comment": null}, "other_street": {"type": "integer", "index": 331, "name": "other_street", "comment": null}, "other_state": {"type": "integer", "index": 332, "name": "other_state", "comment": null}, "home_phone": {"type": "integer", "index": 333, "name": "home_phone", "comment": null}, "other_city": {"type": "integer", "index": 334, "name": "other_city", "comment": null}, "company_c": {"type": "integer", "index": 335, "name": "company_c", "comment": null}, "opportunity_c": {"type": "integer", "index": 336, "name": "opportunity_c", "comment": null}, "hvr_update_c": {"type": "integer", "index": 337, "name": "hvr_update_c", "comment": null}, "other_phone": {"type": "integer", "index": 338, "name": "other_phone", "comment": null}, "other_geocode_accuracy": {"type": "integer", "index": 339, "name": "other_geocode_accuracy", "comment": null}, "other_postal_code": {"type": "integer", "index": 340, "name": "other_postal_code", "comment": null}, "other_country": {"type": "integer", "index": 341, "name": "other_country", "comment": null}, "assistant_phone": {"type": "integer", "index": 342, "name": "assistant_phone", "comment": null}, "jigsaw": {"type": "integer", "index": 343, "name": "jigsaw", "comment": null}, "avatar_c": {"type": "integer", "index": 344, "name": "avatar_c", "comment": null}, "other_longitude": {"type": "integer", "index": 345, "name": "other_longitude", "comment": null}, "lean_data_status_info_c": {"type": "integer", "index": 346, "name": "lean_data_status_info_c", "comment": null}, "analytics_id_c": {"type": "integer", "index": 347, "name": "analytics_id_c", "comment": null}, "dnb_primary_address_postal_code_c": {"type": "integer", "index": 348, "name": "dnb_primary_address_postal_code_c", "comment": null}, "dnb_contact_phone_c": {"type": "integer", "index": 349, "name": "dnb_contact_phone_c", "comment": null}, "dnb_email_deliverability_score_c": {"type": "integer", "index": 350, "name": "dnb_email_deliverability_score_c", "comment": null}, "dnb_job_title_c": {"type": "integer", "index": 351, "name": "dnb_job_title_c", "comment": null}, "dnb_email_c": {"type": "integer", "index": 352, "name": "dnb_email_c", "comment": null}, "dnb_primary_address_city_c": {"type": "integer", "index": 353, "name": "dnb_primary_address_city_c", "comment": null}, "dnb_phone_accuracy_score_c": {"type": "integer", "index": 354, "name": "dnb_phone_accuracy_score_c", "comment": null}, "dnb_primary_address_state_province_c": {"type": "integer", "index": 355, "name": "dnb_primary_address_state_province_c", "comment": null}, "dnb_primary_address_state_province_abbre_c": {"type": "integer", "index": 356, "name": "dnb_primary_address_state_province_abbre_c", "comment": null}, "dnb_primary_address_country_region_code_c": {"type": "integer", "index": 357, "name": "dnb_primary_address_country_region_code_c", "comment": null}, "email_opt_in_double_c": {"type": "integer", "index": 358, "name": "email_opt_in_double_c", "comment": null}, "phone_number_catch_all_c": {"type": "integer", "index": 359, "name": "phone_number_catch_all_c", "comment": null}, "contact_owners_manager_stamped_c": {"type": "integer", "index": 360, "name": "contact_owners_manager_stamped_c", "comment": null}, "fivetran_account_id_c": {"type": "integer", "index": 361, "name": "fivetran_account_id_c", "comment": null}, "contacts_domain_exists_c": {"type": "integer", "index": 362, "name": "contacts_domain_exists_c", "comment": null}, "utm_id_c": {"type": "integer", "index": 363, "name": "utm_id_c", "comment": null}, "self_service_routing_c": {"type": "integer", "index": 364, "name": "self_service_routing_c", "comment": null}, "no_geo_data_c": {"type": "integer", "index": 365, "name": "no_geo_data_c", "comment": null}, "to_be_deleted_salesloft_backfill_c": {"type": "integer", "index": 366, "name": "to_be_deleted_salesloft_backfill_c", "comment": null}, "do_not_sync_reason_marketo_c": {"type": "integer", "index": 367, "name": "do_not_sync_reason_marketo_c", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 368, "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.salesforce_source.salesforce.contact"}, "source.salesforce_source.salesforce_history.contact": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_contact_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_active": {"type": "boolean", "index": 1, "name": "_fivetran_active", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_end", "comment": null}, "id": {"type": "text", "index": 4, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 6, "name": "account_id", "comment": null}, "email": {"type": "text", "index": 7, "name": "email", "comment": null}, "first_name": {"type": "text", "index": 8, "name": "first_name", "comment": null}, "is_deleted": {"type": "boolean", "index": 9, "name": "is_deleted", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 10, "name": "last_activity_date", "comment": null}, "last_modified_by_id": {"type": "text", "index": 11, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 12, "name": "last_modified_date", "comment": null}, "last_name": {"type": "text", "index": 13, "name": "last_name", "comment": null}, "last_referenced_date": {"type": "integer", "index": 14, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 15, "name": "last_viewed_date", "comment": null}, "mailing_city": {"type": "text", "index": 16, "name": "mailing_city", "comment": null}, "mailing_country": {"type": "text", "index": 17, "name": "mailing_country", "comment": null}, "mailing_country_code": {"type": "text", "index": 18, "name": "mailing_country_code", "comment": null}, "mailing_postal_code": {"type": "integer", "index": 19, "name": "mailing_postal_code", "comment": null}, "mailing_state": {"type": "text", "index": 20, "name": "mailing_state", "comment": null}, "mailing_street": {"type": "text", "index": 21, "name": "mailing_street", "comment": null}, "master_record_id": {"type": "integer", "index": 22, "name": "master_record_id", "comment": null}, "mobile_phone": {"type": "integer", "index": 23, "name": "mobile_phone", "comment": null}, "name": {"type": "text", "index": 24, "name": "name", "comment": null}, "owner_id": {"type": "text", "index": 25, "name": "owner_id", "comment": null}, "phone": {"type": "text", "index": 26, "name": "phone", "comment": null}, "reports_to_id": {"type": "integer", "index": 27, "name": "reports_to_id", "comment": null}, "title": {"type": "text", "index": 28, "name": "title", "comment": null}, "lead_source": {"type": "text", "index": 29, "name": "lead_source", "comment": null}, "description": {"type": "text", "index": 30, "name": "description", "comment": null}, "individual_id": {"type": "integer", "index": 31, "name": "individual_id", "comment": null}, "home_phone": {"type": "integer", "index": 32, "name": "home_phone", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "source.salesforce_source.salesforce_history.contact"}, "source.salesforce_source.salesforce.event": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_event_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "activity_date": {"type": "timestamp without time zone", "index": 4, "name": "activity_date", "comment": null}, "activity_date_time": {"type": "timestamp without time zone", "index": 5, "name": "activity_date_time", "comment": null}, "created_by_id": {"type": "text", "index": 6, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 7, "name": "created_date", "comment": null}, "description": {"type": "text", "index": 8, "name": "description", "comment": null}, "duration_in_minutes": {"type": "integer", "index": 9, "name": "duration_in_minutes", "comment": null}, "end_date_time": {"type": "timestamp without time zone", "index": 10, "name": "end_date_time", "comment": null}, "event_subtype": {"type": "text", "index": 11, "name": "event_subtype", "comment": null}, "group_event_type": {"type": "integer", "index": 12, "name": "group_event_type", "comment": null}, "invitee_uuid_c": {"type": "integer", "index": 13, "name": "invitee_uuid_c", "comment": null}, "is_child": {"type": "boolean", "index": 14, "name": "is_child", "comment": null}, "is_deleted": {"type": "boolean", "index": 15, "name": "is_deleted", "comment": null}, "is_group_event": {"type": "boolean", "index": 16, "name": "is_group_event", "comment": null}, "is_private": {"type": "boolean", "index": 17, "name": "is_private", "comment": null}, "is_recurrence": {"type": "boolean", "index": 18, "name": "is_recurrence", "comment": null}, "is_reminder_set": {"type": "boolean", "index": 19, "name": "is_reminder_set", "comment": null}, "last_modified_by_id": {"type": "text", "index": 20, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 21, "name": "last_modified_date", "comment": null}, "location": {"type": "integer", "index": 22, "name": "location", "comment": null}, "no_show_c": {"type": "boolean", "index": 23, "name": "no_show_c", "comment": null}, "owner_id": {"type": "text", "index": 24, "name": "owner_id", "comment": null}, "recurrence_activity_id": {"type": "integer", "index": 25, "name": "recurrence_activity_id", "comment": null}, "recurrence_day_of_month": {"type": "integer", "index": 26, "name": "recurrence_day_of_month", "comment": null}, "recurrence_day_of_week_mask": {"type": "integer", "index": 27, "name": "recurrence_day_of_week_mask", "comment": null}, "recurrence_end_date_only": {"type": "timestamp without time zone", "index": 28, "name": "recurrence_end_date_only", "comment": null}, "recurrence_instance": {"type": "integer", "index": 29, "name": "recurrence_instance", "comment": null}, "recurrence_interval": {"type": "integer", "index": 30, "name": "recurrence_interval", "comment": null}, "recurrence_month_of_year": {"type": "integer", "index": 31, "name": "recurrence_month_of_year", "comment": null}, "recurrence_start_date_time": {"type": "timestamp without time zone", "index": 32, "name": "recurrence_start_date_time", "comment": null}, "recurrence_time_zone_sid_key": {"type": "integer", "index": 33, "name": "recurrence_time_zone_sid_key", "comment": null}, "recurrence_type": {"type": "integer", "index": 34, "name": "recurrence_type", "comment": null}, "referral_account_c": {"type": "integer", "index": 35, "name": "referral_account_c", "comment": null}, "referral_contact_c": {"type": "integer", "index": 36, "name": "referral_contact_c", "comment": null}, "reminder_date_time": {"type": "timestamp without time zone", "index": 37, "name": "reminder_date_time", "comment": null}, "show_as": {"type": "text", "index": 38, "name": "show_as", "comment": null}, "start_date_time": {"type": "timestamp without time zone", "index": 39, "name": "start_date_time", "comment": null}, "subject": {"type": "text", "index": 40, "name": "subject", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 41, "name": "system_modstamp", "comment": null}, "type": {"type": "text", "index": 42, "name": "type", "comment": null}, "what_count": {"type": "integer", "index": 43, "name": "what_count", "comment": null}, "what_id": {"type": "text", "index": 44, "name": "what_id", "comment": null}, "who_count": {"type": "integer", "index": 45, "name": "who_count", "comment": null}, "who_id": {"type": "text", "index": 46, "name": "who_id", "comment": null}, "first_meeting_held_c": {"type": "integer", "index": 47, "name": "first_meeting_held_c", "comment": null}, "associated_sdr_c": {"type": "integer", "index": 48, "name": "associated_sdr_c", "comment": null}, "first_meeting_c": {"type": "integer", "index": 49, "name": "first_meeting_c", "comment": null}, "call_recording_c": {"type": "integer", "index": 50, "name": "call_recording_c", "comment": null}, "affectlayer_chorus_call_id_c": {"type": "integer", "index": 51, "name": "affectlayer_chorus_call_id_c", "comment": null}, "affectlayer_affect_layer_call_id_c": {"type": "integer", "index": 52, "name": "affectlayer_affect_layer_call_id_c", "comment": null}, "last_rep_activity_date_c": {"type": "integer", "index": 53, "name": "last_rep_activity_date_c", "comment": null}, "lid_url_c": {"type": "integer", "index": 54, "name": "lid_url_c", "comment": null}, "lid_date_sent_c": {"type": "integer", "index": 55, "name": "lid_date_sent_c", "comment": null}, "sales_loft_step_id_c": {"type": "integer", "index": 56, "name": "sales_loft_step_id_c", "comment": null}, "sales_loft_step_name_c": {"type": "integer", "index": 57, "name": "sales_loft_step_name_c", "comment": null}, "sales_loft_step_type_c": {"type": "integer", "index": 58, "name": "sales_loft_step_type_c", "comment": null}, "sales_loft_email_template_id_c": {"type": "integer", "index": 59, "name": "sales_loft_email_template_id_c", "comment": null}, "sales_loft_external_identifier_c": {"type": "integer", "index": 60, "name": "sales_loft_external_identifier_c", "comment": null}, "sales_loft_cadence_id_c": {"type": "integer", "index": 61, "name": "sales_loft_cadence_id_c", "comment": null}, "sales_loft_clicked_count_c": {"type": "integer", "index": 62, "name": "sales_loft_clicked_count_c", "comment": null}, "sales_loft_cadence_name_c": {"type": "integer", "index": 63, "name": "sales_loft_cadence_name_c", "comment": null}, "sales_loft_reply_count_c": {"type": "integer", "index": 64, "name": "sales_loft_reply_count_c", "comment": null}, "call_disposition_c": {"type": "integer", "index": 65, "name": "call_disposition_c", "comment": null}, "sales_loft_email_template_title_c": {"type": "integer", "index": 66, "name": "sales_loft_email_template_title_c", "comment": null}, "sales_loft_step_day_new_c": {"type": "integer", "index": 67, "name": "sales_loft_step_day_new_c", "comment": null}, "call_disposition_2_c": {"type": "integer", "index": 68, "name": "call_disposition_2_c", "comment": null}, "sales_loft_viewed_count_c": {"type": "integer", "index": 69, "name": "sales_loft_viewed_count_c", "comment": null}, "sales_loft_1_sales_loft_step_day_c": {"type": "integer", "index": 70, "name": "sales_loft_1_sales_loft_step_day_c", "comment": null}, "sales_loft_1_sales_loft_clicked_count_c": {"type": "integer", "index": 71, "name": "sales_loft_1_sales_loft_clicked_count_c", "comment": null}, "sales_loft_1_sales_loft_view_count_c": {"type": "integer", "index": 72, "name": "sales_loft_1_sales_loft_view_count_c", "comment": null}, "sales_loft_1_call_disposition_c": {"type": "integer", "index": 73, "name": "sales_loft_1_call_disposition_c", "comment": null}, "sales_loft_1_sales_loft_replies_count_c": {"type": "integer", "index": 74, "name": "sales_loft_1_sales_loft_replies_count_c", "comment": null}, "sales_loft_1_sales_loft_cadence_name_c": {"type": "integer", "index": 75, "name": "sales_loft_1_sales_loft_cadence_name_c", "comment": null}, "sales_loft_1_call_sentiment_c": {"type": "integer", "index": 76, "name": "sales_loft_1_call_sentiment_c", "comment": null}, "sales_loft_1_sales_loft_email_template_title_c": {"type": "integer", "index": 77, "name": "sales_loft_1_sales_loft_email_template_title_c", "comment": null}, "is_recurrence_2": {"type": "boolean", "index": 78, "name": "is_recurrence_2", "comment": null}, "is_recurrence_2_exception": {"type": "boolean", "index": 79, "name": "is_recurrence_2_exception", "comment": null}, "is_recurrence_2_exclusion": {"type": "boolean", "index": 80, "name": "is_recurrence_2_exclusion", "comment": null}, "recurrence_2_pattern_start_date": {"type": "timestamp without time zone", "index": 81, "name": "recurrence_2_pattern_start_date", "comment": null}, "recurrence_2_pattern_text": {"type": "integer", "index": 82, "name": "recurrence_2_pattern_text", "comment": null}, "recurrence_2_pattern_time_zone": {"type": "integer", "index": 83, "name": "recurrence_2_pattern_time_zone", "comment": null}, "recurrence_2_pattern_version": {"type": "integer", "index": 84, "name": "recurrence_2_pattern_version", "comment": null}, "co_selling_activity_c": {"type": "integer", "index": 85, "name": "co_selling_activity_c", "comment": null}, "is_a_co_sell_activity_c": {"type": "integer", "index": 86, "name": "is_a_co_sell_activity_c", "comment": null}, "partner_contact_c": {"type": "integer", "index": 87, "name": "partner_contact_c", "comment": null}, "description_c": {"type": "integer", "index": 88, "name": "description_c", "comment": null}, "campaign_c": {"type": "integer", "index": 89, "name": "campaign_c", "comment": null}, "event_name_c": {"type": "integer", "index": 90, "name": "event_name_c", "comment": null}, "partner_account_c": {"type": "integer", "index": 91, "name": "partner_account_c", "comment": null}, "topic_c": {"type": "integer", "index": 92, "name": "topic_c", "comment": null}, "attendance_number_c": {"type": "integer", "index": 93, "name": "attendance_number_c", "comment": null}, "partner_activity_type_c": {"type": "integer", "index": 94, "name": "partner_activity_type_c", "comment": null}, "how_did_you_bring_value_or_create_trust_c": {"type": "integer", "index": 95, "name": "how_did_you_bring_value_or_create_trust_c", "comment": null}, "proof_of_referral_c": {"type": "integer", "index": 96, "name": "proof_of_referral_c", "comment": null}, "how_did_you_bring_value_or_earn_trust_c": {"type": "integer", "index": 97, "name": "how_did_you_bring_value_or_earn_trust_c", "comment": null}, "duration_in_minutes_c": {"type": "integer", "index": 98, "name": "duration_in_minutes_c", "comment": null}, "vidyard_c": {"type": "boolean", "index": 99, "name": "vidyard_c", "comment": null}, "collections_hold_c": {"type": "boolean", "index": 100, "name": "collections_hold_c", "comment": null}, "execute_collections_plan_activity_c": {"type": "boolean", "index": 101, "name": "execute_collections_plan_activity_c", "comment": null}, "expected_payment_date_c": {"type": "integer", "index": 102, "name": "expected_payment_date_c", "comment": null}, "end_date": {"type": "timestamp without time zone", "index": 103, "name": "end_date", "comment": null}, "opportunity_c": {"type": "integer", "index": 104, "name": "opportunity_c", "comment": null}, "meeting_type_c": {"type": "integer", "index": 105, "name": "meeting_type_c", "comment": null}, "meeting_name_c": {"type": "integer", "index": 106, "name": "meeting_name_c", "comment": null}, "bizible_2_bizible_id_c": {"type": "integer", "index": 107, "name": "bizible_2_bizible_id_c", "comment": null}, "bizible_2_bizible_touchpoint_date_c": {"type": "integer", "index": 108, "name": "bizible_2_bizible_touchpoint_date_c", "comment": null}, "assigned_to_role_c": {"type": "integer", "index": 109, "name": "assigned_to_role_c", "comment": null}, "assigned_to_name_c": {"type": "integer", "index": 110, "name": "assigned_to_name_c", "comment": null}, "legacy_hvr_id_c": {"type": "integer", "index": 111, "name": "legacy_hvr_id_c", "comment": null}, "is_archived": {"type": "boolean", "index": 112, "name": "is_archived", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 113, "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.salesforce_source.salesforce.event"}, "source.salesforce_source.salesforce.lead": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_lead_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"country": {"type": "integer", "index": 1, "name": "country", "comment": null}, "email_bounced_reason": {"type": "integer", "index": 2, "name": "email_bounced_reason", "comment": null}, "email_bounced_date": {"type": "timestamp without time zone", "index": 3, "name": "email_bounced_date", "comment": null}, "owner_id": {"type": "text", "index": 4, "name": "owner_id", "comment": null}, "lead_source": {"type": "integer", "index": 5, "name": "lead_source", "comment": null}, "converted_date": {"type": "timestamp without time zone", "index": 6, "name": "converted_date", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 7, "name": "last_modified_date", "comment": null}, "master_record_id": {"type": "integer", "index": 8, "name": "master_record_id", "comment": null}, "last_modified_by_id": {"type": "text", "index": 9, "name": "last_modified_by_id", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 10, "name": "system_modstamp", "comment": null}, "geocode_accuracy": {"type": "integer", "index": 11, "name": "geocode_accuracy", "comment": null}, "converted_contact_id": {"type": "text", "index": 12, "name": "converted_contact_id", "comment": null}, "id": {"type": "text", "index": 13, "name": "id", "comment": null}, "photo_url": {"type": "text", "index": 14, "name": "photo_url", "comment": null}, "state": {"type": "integer", "index": 15, "name": "state", "comment": null}, "longitude": {"type": "integer", "index": 16, "name": "longitude", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 17, "name": "last_referenced_date", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 18, "name": "last_activity_date", "comment": null}, "country_code": {"type": "integer", "index": 19, "name": "country_code", "comment": null}, "phone": {"type": "integer", "index": 20, "name": "phone", "comment": null}, "name": {"type": "text", "index": 21, "name": "name", "comment": null}, "jigsaw_contact_id": {"type": "integer", "index": 22, "name": "jigsaw_contact_id", "comment": null}, "created_by_id": {"type": "text", "index": 23, "name": "created_by_id", "comment": null}, "salutation": {"type": "integer", "index": 24, "name": "salutation", "comment": null}, "is_converted": {"type": "boolean", "index": 25, "name": "is_converted", "comment": null}, "state_code": {"type": "integer", "index": 26, "name": "state_code", "comment": null}, "is_unread_by_owner": {"type": "boolean", "index": 27, "name": "is_unread_by_owner", "comment": null}, "status": {"type": "text", "index": 28, "name": "status", "comment": null}, "city": {"type": "integer", "index": 29, "name": "city", "comment": null}, "latitude": {"type": "integer", "index": 30, "name": "latitude", "comment": null}, "cbit_clearbit_c": {"type": "integer", "index": 31, "name": "cbit_clearbit_c", "comment": null}, "industry": {"type": "text", "index": 32, "name": "industry", "comment": null}, "title": {"type": "integer", "index": 33, "name": "title", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 34, "name": "_fivetran_synced", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 35, "name": "last_viewed_date", "comment": null}, "converted_opportunity_id": {"type": "integer", "index": 36, "name": "converted_opportunity_id", "comment": null}, "is_deleted": {"type": "boolean", "index": 37, "name": "is_deleted", "comment": null}, "street": {"type": "integer", "index": 38, "name": "street", "comment": null}, "company": {"type": "text", "index": 39, "name": "company", "comment": null}, "first_name": {"type": "text", "index": 40, "name": "first_name", "comment": null}, "email": {"type": "text", "index": 41, "name": "email", "comment": null}, "website": {"type": "integer", "index": 42, "name": "website", "comment": null}, "last_name": {"type": "text", "index": 43, "name": "last_name", "comment": null}, "number_of_employees": {"type": "integer", "index": 44, "name": "number_of_employees", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 45, "name": "created_date", "comment": null}, "active_in_sequence_c": {"type": "boolean", "index": 46, "name": "active_in_sequence_c", "comment": null}, "postal_code": {"type": "integer", "index": 47, "name": "postal_code", "comment": null}, "has_opted_out_of_email": {"type": "boolean", "index": 48, "name": "has_opted_out_of_email", "comment": null}, "converted_account_id": {"type": "text", "index": 49, "name": "converted_account_id", "comment": null}, "mobile_phone": {"type": "integer", "index": 50, "name": "mobile_phone", "comment": null}, "annual_revenue": {"type": "integer", "index": 51, "name": "annual_revenue", "comment": null}, "description": {"type": "integer", "index": 52, "name": "description", "comment": null}, "fax": {"type": "integer", "index": 53, "name": "fax", "comment": null}, "lean_data_marketing_sys_created_date_c": {"type": "integer", "index": 54, "name": "lean_data_marketing_sys_created_date_c", "comment": null}, "individual_id": {"type": "integer", "index": 55, "name": "individual_id", "comment": null}, "source_every_lead_source_detail_c": {"type": "integer", "index": 56, "name": "source_every_lead_source_detail_c", "comment": null}, "source_first_lead_source_detail_c": {"type": "integer", "index": 57, "name": "source_first_lead_source_detail_c", "comment": null}, "leandata_contact_owner_override_c": {"type": "integer", "index": 58, "name": "leandata_contact_owner_override_c", "comment": null}, "potential_fivetran_use_case_c": {"type": "text", "index": 59, "name": "potential_fivetran_use_case_c", "comment": null}, "bizible_2_account_c": {"type": "integer", "index": 60, "name": "bizible_2_account_c", "comment": null}, "bizible_2_ad_campaign_name_ft_c": {"type": "integer", "index": 61, "name": "bizible_2_ad_campaign_name_ft_c", "comment": null}, "bizible_2_ad_campaign_name_lc_c": {"type": "integer", "index": 62, "name": "bizible_2_ad_campaign_name_lc_c", "comment": null}, "bizible_2_bizible_id_c": {"type": "integer", "index": 63, "name": "bizible_2_bizible_id_c", "comment": null}, "bizible_2_landing_page_ft_c": {"type": "integer", "index": 64, "name": "bizible_2_landing_page_ft_c", "comment": null}, "bizible_2_landing_page_lc_c": {"type": "integer", "index": 65, "name": "bizible_2_landing_page_lc_c", "comment": null}, "bizible_2_marketing_channel_ft_c": {"type": "integer", "index": 66, "name": "bizible_2_marketing_channel_ft_c", "comment": null}, "bizible_2_marketing_channel_lc_c": {"type": "integer", "index": 67, "name": "bizible_2_marketing_channel_lc_c", "comment": null}, "bizible_2_touchpoint_date_ft_c": {"type": "integer", "index": 68, "name": "bizible_2_touchpoint_date_ft_c", "comment": null}, "bizible_2_touchpoint_date_lc_c": {"type": "integer", "index": 69, "name": "bizible_2_touchpoint_date_lc_c", "comment": null}, "bizible_2_touchpoint_source_ft_c": {"type": "integer", "index": 70, "name": "bizible_2_touchpoint_source_ft_c", "comment": null}, "bizible_2_touchpoint_source_lc_c": {"type": "integer", "index": 71, "name": "bizible_2_touchpoint_source_lc_c", "comment": null}, "sales_email_opt_out_c": {"type": "boolean", "index": 72, "name": "sales_email_opt_out_c", "comment": null}, "sales_email_opt_out_date_time_c": {"type": "integer", "index": 73, "name": "sales_email_opt_out_date_time_c", "comment": null}, "bombora_app_bombora_surge_record_count_c": {"type": "integer", "index": 74, "name": "bombora_app_bombora_surge_record_count_c", "comment": null}, "bombora_app_bombora_last_date_time_updated_c": {"type": "integer", "index": 75, "name": "bombora_app_bombora_last_date_time_updated_c", "comment": null}, "bombora_app_bombora_total_composite_score_c": {"type": "integer", "index": 76, "name": "bombora_app_bombora_total_composite_score_c", "comment": null}, "linked_in_url_c": {"type": "integer", "index": 77, "name": "linked_in_url_c", "comment": null}, "beta_connector_interest_c": {"type": "integer", "index": 78, "name": "beta_connector_interest_c", "comment": null}, "user_gems_ug_past_infos_c": {"type": "integer", "index": 79, "name": "user_gems_ug_past_infos_c", "comment": null}, "user_gems_ug_current_infos_c": {"type": "integer", "index": 80, "name": "user_gems_ug_current_infos_c", "comment": null}, "user_gems_ug_created_by_ug_c": {"type": "boolean", "index": 81, "name": "user_gems_ug_created_by_ug_c", "comment": null}, "free_trial_email_confirmed_date_c": {"type": "integer", "index": 82, "name": "free_trial_email_confirmed_date_c", "comment": null}, "dnboptimizer_dn_bcontact_record_c": {"type": "integer", "index": 83, "name": "dnboptimizer_dn_bcontact_record_c", "comment": null}, "dnboptimizer_dn_bcompany_record_c": {"type": "integer", "index": 84, "name": "dnboptimizer_dn_bcompany_record_c", "comment": null}, "dnboptimizer_dnb_d_u_n_s_number_c": {"type": "integer", "index": 85, "name": "dnboptimizer_dnb_d_u_n_s_number_c", "comment": null}, "i_sell_oskey_id_c": {"type": "integer", "index": 86, "name": "i_sell_oskey_id_c", "comment": null}, "verified_c": {"type": "boolean", "index": 87, "name": "verified_c", "comment": null}, "email_opt_out_date_time_c": {"type": "integer", "index": 88, "name": "email_opt_out_date_time_c", "comment": null}, "pbf_startup_c": {"type": "integer", "index": 89, "name": "pbf_startup_c", "comment": null}, "pbf_startup_certify_eligibility_c": {"type": "boolean", "index": 90, "name": "pbf_startup_certify_eligibility_c", "comment": null}, "engagio_intent_minutes_last_30_days_c": {"type": "integer", "index": 91, "name": "engagio_intent_minutes_last_30_days_c", "comment": null}, "engagio_engagement_minutes_last_3_months_c": {"type": "integer", "index": 92, "name": "engagio_engagement_minutes_last_3_months_c", "comment": null}, "engagio_engagement_minutes_last_7_days_c": {"type": "integer", "index": 93, "name": "engagio_engagement_minutes_last_7_days_c", "comment": null}, "engagio_matched_account_c": {"type": "integer", "index": 94, "name": "engagio_matched_account_c", "comment": null}, "engagio_first_engagement_date_c": {"type": "integer", "index": 95, "name": "engagio_first_engagement_date_c", "comment": null}, "engagio_match_time_c": {"type": "integer", "index": 96, "name": "engagio_match_time_c", "comment": null}, "engagio_department_c": {"type": "integer", "index": 97, "name": "engagio_department_c", "comment": null}, "engagio_role_c": {"type": "integer", "index": 98, "name": "engagio_role_c", "comment": null}, "legacy_hvr_id_c": {"type": "integer", "index": 99, "name": "legacy_hvr_id_c", "comment": null}, "hvr_channel_c": {"type": "integer", "index": 100, "name": "hvr_channel_c", "comment": null}, "email_opt_in_double_c": {"type": "boolean", "index": 101, "name": "email_opt_in_double_c", "comment": null}, "phone_number_catch_all_c": {"type": "integer", "index": 102, "name": "phone_number_catch_all_c", "comment": null}, "contacts_domain_exists_c": {"type": "integer", "index": 103, "name": "contacts_domain_exists_c", "comment": null}, "utm_id_c": {"type": "integer", "index": 104, "name": "utm_id_c", "comment": null}, "source_every_utm_id_c": {"type": "integer", "index": 105, "name": "source_every_utm_id_c", "comment": null}, "source_last_utm_id_c": {"type": "integer", "index": 106, "name": "source_last_utm_id_c", "comment": null}, "source_first_utm_id_c": {"type": "integer", "index": 107, "name": "source_first_utm_id_c", "comment": null}, "do_not_sync_reason_marketo_c": {"type": "integer", "index": 108, "name": "do_not_sync_reason_marketo_c", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 109, "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.salesforce_source.salesforce.lead"}, "source.salesforce_source.salesforce.opportunity": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_opportunity_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "amount": {"type": "double precision", "index": 3, "name": "amount", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "close_date": {"type": "timestamp without time zone", "index": 5, "name": "close_date", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 6, "name": "created_date", "comment": null}, "description": {"type": "integer", "index": 7, "name": "description", "comment": null}, "expected_revenue": {"type": "integer", "index": 8, "name": "expected_revenue", "comment": null}, "fiscal": {"type": "text", "index": 9, "name": "fiscal", "comment": null}, "fiscal_quarter": {"type": "integer", "index": 10, "name": "fiscal_quarter", "comment": null}, "fiscal_year": {"type": "integer", "index": 11, "name": "fiscal_year", "comment": null}, "forecast_category": {"type": "text", "index": 12, "name": "forecast_category", "comment": null}, "forecast_category_name": {"type": "text", "index": 13, "name": "forecast_category_name", "comment": null}, "has_open_activity": {"type": "boolean", "index": 14, "name": "has_open_activity", "comment": null}, "has_opportunity_line_item": {"type": "boolean", "index": 15, "name": "has_opportunity_line_item", "comment": null}, "has_overdue_task": {"type": "boolean", "index": 16, "name": "has_overdue_task", "comment": null}, "id": {"type": "text", "index": 17, "name": "id", "comment": null}, "is_closed": {"type": "boolean", "index": 18, "name": "is_closed", "comment": null}, "is_deleted": {"type": "boolean", "index": 19, "name": "is_deleted", "comment": null}, "is_excluded_from_territory_2_filter": {"type": "integer", "index": 20, "name": "is_excluded_from_territory_2_filter", "comment": null}, "is_won": {"type": "boolean", "index": 21, "name": "is_won", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 22, "name": "last_activity_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 23, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 24, "name": "last_viewed_date", "comment": null}, "lead_source": {"type": "text", "index": 25, "name": "lead_source", "comment": null}, "name": {"type": "text", "index": 26, "name": "name", "comment": null}, "next_step": {"type": "integer", "index": 27, "name": "next_step", "comment": null}, "owner_id": {"type": "text", "index": 28, "name": "owner_id", "comment": null}, "pricebook_2_id": {"type": "text", "index": 29, "name": "pricebook_2_id", "comment": null}, "probability": {"type": "double precision", "index": 30, "name": "probability", "comment": null}, "record_type_id": {"type": "text", "index": 31, "name": "record_type_id", "comment": null}, "stage_name": {"type": "text", "index": 32, "name": "stage_name", "comment": null}, "synced_quote_id": {"type": "integer", "index": 33, "name": "synced_quote_id", "comment": null}, "territory_2_id": {"type": "integer", "index": 34, "name": "territory_2_id", "comment": null}, "type": {"type": "text", "index": 35, "name": "type", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 36, "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.salesforce_source.salesforce.opportunity"}, "source.salesforce_source.salesforce_history.opportunity": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_opportunity_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_active": {"type": "boolean", "index": 1, "name": "_fivetran_active", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_end", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 5, "name": "account_id", "comment": null}, "amount": {"type": "double precision", "index": 6, "name": "amount", "comment": null}, "campaign_id": {"type": "integer", "index": 7, "name": "campaign_id", "comment": null}, "close_date": {"type": "timestamp without time zone", "index": 8, "name": "close_date", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 9, "name": "created_date", "comment": null}, "description": {"type": "integer", "index": 10, "name": "description", "comment": null}, "expected_revenue": {"type": "double precision", "index": 11, "name": "expected_revenue", "comment": null}, "fiscal": {"type": "text", "index": 12, "name": "fiscal", "comment": null}, "fiscal_quarter": {"type": "integer", "index": 13, "name": "fiscal_quarter", "comment": null}, "fiscal_year": {"type": "integer", "index": 14, "name": "fiscal_year", "comment": null}, "forecast_category": {"type": "text", "index": 15, "name": "forecast_category", "comment": null}, "forecast_category_name": {"type": "text", "index": 16, "name": "forecast_category_name", "comment": null}, "has_open_activity": {"type": "boolean", "index": 17, "name": "has_open_activity", "comment": null}, "has_opportunity_line_item": {"type": "boolean", "index": 18, "name": "has_opportunity_line_item", "comment": null}, "has_overdue_task": {"type": "boolean", "index": 19, "name": "has_overdue_task", "comment": null}, "id": {"type": "text", "index": 20, "name": "id", "comment": null}, "is_closed": {"type": "boolean", "index": 21, "name": "is_closed", "comment": null}, "is_deleted": {"type": "boolean", "index": 22, "name": "is_deleted", "comment": null}, "is_won": {"type": "boolean", "index": 23, "name": "is_won", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 24, "name": "last_activity_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 25, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 26, "name": "last_viewed_date", "comment": null}, "lead_source": {"type": "text", "index": 27, "name": "lead_source", "comment": null}, "name": {"type": "text", "index": 28, "name": "name", "comment": null}, "next_step": {"type": "integer", "index": 29, "name": "next_step", "comment": null}, "owner_id": {"type": "text", "index": 30, "name": "owner_id", "comment": null}, "probability": {"type": "integer", "index": 31, "name": "probability", "comment": null}, "record_type_id": {"type": "text", "index": 32, "name": "record_type_id", "comment": null}, "stage_name": {"type": "text", "index": 33, "name": "stage_name", "comment": null}, "synced_quote_id": {"type": "integer", "index": 34, "name": "synced_quote_id", "comment": null}, "type": {"type": "text", "index": 35, "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.salesforce_source.salesforce_history.opportunity"}, "source.salesforce_source.salesforce.opportunity_line_item": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_opportunity_line_item_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"product_2_id": {"type": "text", "index": 1, "name": "product_2_id", "comment": null}, "quantity": {"type": "integer", "index": 2, "name": "quantity", "comment": null}, "total_price": {"type": "double precision", "index": 3, "name": "total_price", "comment": null}, "description": {"type": "integer", "index": 4, "name": "description", "comment": null}, "discount": {"type": "integer", "index": 5, "name": "discount", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 6, "name": "last_modified_date", "comment": null}, "list_price": {"type": "integer", "index": 7, "name": "list_price", "comment": null}, "product_code": {"type": "text", "index": 8, "name": "product_code", "comment": null}, "unit_price": {"type": "double precision", "index": 9, "name": "unit_price", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 10, "name": "_fivetran_synced", "comment": null}, "is_deleted": {"type": "boolean", "index": 11, "name": "is_deleted", "comment": null}, "opportunity_id": {"type": "text", "index": 12, "name": "opportunity_id", "comment": null}, "last_modified_by_id": {"type": "text", "index": 13, "name": "last_modified_by_id", "comment": null}, "service_date": {"type": "timestamp without time zone", "index": 14, "name": "service_date", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 15, "name": "system_modstamp", "comment": null}, "name": {"type": "text", "index": 16, "name": "name", "comment": null}, "id": {"type": "text", "index": 17, "name": "id", "comment": null}, "created_by_id": {"type": "text", "index": 18, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 19, "name": "created_date", "comment": null}, "sort_order": {"type": "integer", "index": 20, "name": "sort_order", "comment": null}, "pricebook_entry_id": {"type": "text", "index": 21, "name": "pricebook_entry_id", "comment": null}, "one_saas_app_included_c": {"type": "integer", "index": 22, "name": "one_saas_app_included_c", "comment": null}, "one_saas_app_quantity_invoiced_c": {"type": "integer", "index": 23, "name": "one_saas_app_quantity_invoiced_c", "comment": null}, "one_saas_app_quantity_not_invoiced_c": {"type": "integer", "index": 24, "name": "one_saas_app_quantity_not_invoiced_c", "comment": null}, "has_quantity_schedule": {"type": "integer", "index": 25, "name": "has_quantity_schedule", "comment": null}, "has_revenue_schedule": {"type": "integer", "index": 26, "name": "has_revenue_schedule", "comment": null}, "has_schedule": {"type": "integer", "index": 27, "name": "has_schedule", "comment": null}, "event_volume_c": {"type": "integer", "index": 28, "name": "event_volume_c", "comment": null}, "roadmap_connections_c": {"type": "integer", "index": 29, "name": "roadmap_connections_c", "comment": null}, "row_volume_c": {"type": "integer", "index": 30, "name": "row_volume_c", "comment": null}, "months_c": {"type": "integer", "index": 31, "name": "months_c", "comment": null}, "netsuite_conn_term_contract_pricing_type_c": {"type": "integer", "index": 32, "name": "netsuite_conn_term_contract_pricing_type_c", "comment": null}, "netsuite_conn_discount_item_c": {"type": "integer", "index": 33, "name": "netsuite_conn_discount_item_c", "comment": null}, "netsuite_conn_user_entered_sales_price_c": {"type": "integer", "index": 34, "name": "netsuite_conn_user_entered_sales_price_c", "comment": null}, "netsuite_conn_item_category_c": {"type": "integer", "index": 35, "name": "netsuite_conn_item_category_c", "comment": null}, "netsuite_conn_terms_c": {"type": "integer", "index": 36, "name": "netsuite_conn_terms_c", "comment": null}, "netsuite_conn_net_suite_item_key_id_c": {"type": "integer", "index": 37, "name": "netsuite_conn_net_suite_item_key_id_c", "comment": null}, "netsuite_conn_pushed_from_net_suite_c": {"type": "boolean", "index": 38, "name": "netsuite_conn_pushed_from_net_suite_c", "comment": null}, "netsuite_conn_end_date_c": {"type": "integer", "index": 39, "name": "netsuite_conn_end_date_c", "comment": null}, "netsuite_conn_list_rate_c": {"type": "integer", "index": 40, "name": "netsuite_conn_list_rate_c", "comment": null}, "netsuite_conn_from_contract_item_id_c": {"type": "integer", "index": 41, "name": "netsuite_conn_from_contract_item_id_c", "comment": null}, "netsuite_conn_start_date_c": {"type": "integer", "index": 42, "name": "netsuite_conn_start_date_c", "comment": null}, "netsuite_conn_net_suite_item_id_import_c": {"type": "integer", "index": 43, "name": "netsuite_conn_net_suite_item_id_import_c", "comment": null}, "sbqq_parent_id_c": {"type": "text", "index": 44, "name": "sbqq_parent_id_c", "comment": null}, "sbqq_quote_line_c": {"type": "text", "index": 45, "name": "sbqq_quote_line_c", "comment": null}, "sbqq_subscription_type_c": {"type": "text", "index": 46, "name": "sbqq_subscription_type_c", "comment": null}, "product_family_c": {"type": "text", "index": 47, "name": "product_family_c", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 48, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 49, "name": "last_viewed_date", "comment": null}, "celigo_sfnsio_contract_item_id_c": {"type": "integer", "index": 50, "name": "celigo_sfnsio_contract_item_id_c", "comment": null}, "celigo_sfnsio_contract_term_c": {"type": "integer", "index": 51, "name": "celigo_sfnsio_contract_term_c", "comment": null}, "celigo_sfnsio_end_date_c": {"type": "integer", "index": 52, "name": "celigo_sfnsio_end_date_c", "comment": null}, "celigo_sfnsio_list_rate_c": {"type": "integer", "index": 53, "name": "celigo_sfnsio_list_rate_c", "comment": null}, "celigo_sfnsio_net_suite_line_id_c": {"type": "integer", "index": 54, "name": "celigo_sfnsio_net_suite_line_id_c", "comment": null}, "celigo_sfnsio_start_date_c": {"type": "integer", "index": 55, "name": "celigo_sfnsio_start_date_c", "comment": null}, "product_code_stamped_c": {"type": "integer", "index": 56, "name": "product_code_stamped_c", "comment": null}, "hvr_use_case_c": {"type": "boolean", "index": 57, "name": "hvr_use_case_c", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 58, "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.salesforce_source.salesforce.opportunity_line_item"}, "source.salesforce_source.salesforce.order": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_order_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "activated_by_id": {"type": "text", "index": 4, "name": "activated_by_id", "comment": null}, "activated_date": {"type": "timestamp without time zone", "index": 5, "name": "activated_date", "comment": null}, "billing_city": {"type": "text", "index": 6, "name": "billing_city", "comment": null}, "billing_country": {"type": "text", "index": 7, "name": "billing_country", "comment": null}, "billing_country_code": {"type": "integer", "index": 8, "name": "billing_country_code", "comment": null}, "billing_geocode_accuracy": {"type": "integer", "index": 9, "name": "billing_geocode_accuracy", "comment": null}, "billing_latitude": {"type": "integer", "index": 10, "name": "billing_latitude", "comment": null}, "billing_longitude": {"type": "integer", "index": 11, "name": "billing_longitude", "comment": null}, "billing_postal_code": {"type": "text", "index": 12, "name": "billing_postal_code", "comment": null}, "billing_state": {"type": "text", "index": 13, "name": "billing_state", "comment": null}, "billing_state_code": {"type": "integer", "index": 14, "name": "billing_state_code", "comment": null}, "billing_street": {"type": "text", "index": 15, "name": "billing_street", "comment": null}, "company_authorized_by_id": {"type": "integer", "index": 16, "name": "company_authorized_by_id", "comment": null}, "contract_id": {"type": "integer", "index": 17, "name": "contract_id", "comment": null}, "created_by_id": {"type": "text", "index": 18, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 19, "name": "created_date", "comment": null}, "customer_authorized_by_id": {"type": "integer", "index": 20, "name": "customer_authorized_by_id", "comment": null}, "description": {"type": "integer", "index": 21, "name": "description", "comment": null}, "effective_date": {"type": "timestamp without time zone", "index": 22, "name": "effective_date", "comment": null}, "end_date": {"type": "timestamp without time zone", "index": 23, "name": "end_date", "comment": null}, "is_deleted": {"type": "boolean", "index": 24, "name": "is_deleted", "comment": null}, "is_reduction_order": {"type": "boolean", "index": 25, "name": "is_reduction_order", "comment": null}, "last_modified_by_id": {"type": "text", "index": 26, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 27, "name": "last_modified_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 28, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 29, "name": "last_viewed_date", "comment": null}, "order_number": {"type": "integer", "index": 30, "name": "order_number", "comment": null}, "original_order_id": {"type": "integer", "index": 31, "name": "original_order_id", "comment": null}, "owner_id": {"type": "text", "index": 32, "name": "owner_id", "comment": null}, "pricebook_2_id": {"type": "text", "index": 33, "name": "pricebook_2_id", "comment": null}, "shipping_city": {"type": "text", "index": 34, "name": "shipping_city", "comment": null}, "shipping_country": {"type": "text", "index": 35, "name": "shipping_country", "comment": null}, "shipping_country_code": {"type": "integer", "index": 36, "name": "shipping_country_code", "comment": null}, "shipping_geocode_accuracy": {"type": "integer", "index": 37, "name": "shipping_geocode_accuracy", "comment": null}, "shipping_latitude": {"type": "integer", "index": 38, "name": "shipping_latitude", "comment": null}, "shipping_longitude": {"type": "integer", "index": 39, "name": "shipping_longitude", "comment": null}, "shipping_postal_code": {"type": "integer", "index": 40, "name": "shipping_postal_code", "comment": null}, "shipping_state": {"type": "text", "index": 41, "name": "shipping_state", "comment": null}, "shipping_state_code": {"type": "integer", "index": 42, "name": "shipping_state_code", "comment": null}, "shipping_street": {"type": "text", "index": 43, "name": "shipping_street", "comment": null}, "status": {"type": "text", "index": 44, "name": "status", "comment": null}, "status_code": {"type": "text", "index": 45, "name": "status_code", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 46, "name": "system_modstamp", "comment": null}, "total_amount": {"type": "double precision", "index": 47, "name": "total_amount", "comment": null}, "type": {"type": "text", "index": 48, "name": "type", "comment": null}, "netsuite_conn_celigo_update_c": {"type": "boolean", "index": 49, "name": "netsuite_conn_celigo_update_c", "comment": null}, "netsuite_conn_net_suite_id_c": {"type": "integer", "index": 50, "name": "netsuite_conn_net_suite_id_c", "comment": null}, "netsuite_conn_net_suite_sync_err_c": {"type": "integer", "index": 51, "name": "netsuite_conn_net_suite_sync_err_c", "comment": null}, "netsuite_conn_pushed_from_net_suite_c": {"type": "boolean", "index": 52, "name": "netsuite_conn_pushed_from_net_suite_c", "comment": null}, "netsuite_conn_opportunity_c": {"type": "integer", "index": 53, "name": "netsuite_conn_opportunity_c", "comment": null}, "netsuite_conn_net_suite_order_status_c": {"type": "text", "index": 54, "name": "netsuite_conn_net_suite_order_status_c", "comment": null}, "netsuite_conn_sync_in_progress_c": {"type": "boolean", "index": 55, "name": "netsuite_conn_sync_in_progress_c", "comment": null}, "netsuite_conn_tax_total_c": {"type": "integer", "index": 56, "name": "netsuite_conn_tax_total_c", "comment": null}, "netsuite_conn_tracking_numbers_c": {"type": "integer", "index": 57, "name": "netsuite_conn_tracking_numbers_c", "comment": null}, "netsuite_conn_push_to_net_suite_c": {"type": "boolean", "index": 58, "name": "netsuite_conn_push_to_net_suite_c", "comment": null}, "netsuite_conn_document_id_c": {"type": "integer", "index": 59, "name": "netsuite_conn_document_id_c", "comment": null}, "netsuite_conn_subtotal_c": {"type": "integer", "index": 60, "name": "netsuite_conn_subtotal_c", "comment": null}, "netsuite_conn_discount_total_c": {"type": "integer", "index": 61, "name": "netsuite_conn_discount_total_c", "comment": null}, "netsuite_conn_total_c": {"type": "integer", "index": 62, "name": "netsuite_conn_total_c", "comment": null}, "netsuite_conn_net_suite_order_date_c": {"type": "timestamp without time zone", "index": 63, "name": "netsuite_conn_net_suite_order_date_c", "comment": null}, "netsuite_conn_ship_date_c": {"type": "integer", "index": 64, "name": "netsuite_conn_ship_date_c", "comment": null}, "netsuite_conn_quote_c": {"type": "integer", "index": 65, "name": "netsuite_conn_quote_c", "comment": null}, "netsuite_conn_net_suite_order_number_c": {"type": "text", "index": 66, "name": "netsuite_conn_net_suite_order_number_c", "comment": null}, "sbqq_contracted_c": {"type": "boolean", "index": 67, "name": "sbqq_contracted_c", "comment": null}, "sbqq_contracting_method_c": {"type": "text", "index": 68, "name": "sbqq_contracting_method_c", "comment": null}, "sbqq_payment_term_c": {"type": "text", "index": 69, "name": "sbqq_payment_term_c", "comment": null}, "sbqq_price_calc_status_c": {"type": "text", "index": 70, "name": "sbqq_price_calc_status_c", "comment": null}, "sbqq_price_calc_status_message_c": {"type": "integer", "index": 71, "name": "sbqq_price_calc_status_message_c", "comment": null}, "sbqq_quote_c": {"type": "text", "index": 72, "name": "sbqq_quote_c", "comment": null}, "sbqq_renewal_term_c": {"type": "integer", "index": 73, "name": "sbqq_renewal_term_c", "comment": null}, "sbqq_renewal_uplift_rate_c": {"type": "integer", "index": 74, "name": "sbqq_renewal_uplift_rate_c", "comment": null}, "ava_sfcpq_ava_tax_message_c": {"type": "text", "index": 75, "name": "ava_sfcpq_ava_tax_message_c", "comment": null}, "ava_sfcpq_entity_use_code_c": {"type": "integer", "index": 76, "name": "ava_sfcpq_entity_use_code_c", "comment": null}, "ava_sfcpq_invoice_message_c": {"type": "integer", "index": 77, "name": "ava_sfcpq_invoice_message_c", "comment": null}, "ava_sfcpq_is_seller_importer_of_record_c": {"type": "boolean", "index": 78, "name": "ava_sfcpq_is_seller_importer_of_record_c", "comment": null}, "ava_sfcpq_order_calculate_tax_c": {"type": "boolean", "index": 79, "name": "ava_sfcpq_order_calculate_tax_c", "comment": null}, "ava_sfcpq_sales_tax_amount_c": {"type": "integer", "index": 80, "name": "ava_sfcpq_sales_tax_amount_c", "comment": null}, "blng_bill_now_c": {"type": "boolean", "index": 81, "name": "blng_bill_now_c", "comment": null}, "blng_billing_account_c": {"type": "text", "index": 82, "name": "blng_billing_account_c", "comment": null}, "blng_billing_day_of_month_c": {"type": "integer", "index": 83, "name": "blng_billing_day_of_month_c", "comment": null}, "blng_invoice_batch_c": {"type": "text", "index": 84, "name": "blng_invoice_batch_c", "comment": null}, "amendment_type_c": {"type": "integer", "index": 85, "name": "amendment_type_c", "comment": null}, "credit_summary_c": {"type": "text", "index": 86, "name": "credit_summary_c", "comment": null}, "evergreen_c": {"type": "boolean", "index": 87, "name": "evergreen_c", "comment": null}, "invoicing_type_c": {"type": "text", "index": 88, "name": "invoicing_type_c", "comment": null}, "legal_entity_c": {"type": "text", "index": 89, "name": "legal_entity_c", "comment": null}, "prepaid_billing_frequency_c": {"type": "text", "index": 90, "name": "prepaid_billing_frequency_c", "comment": null}, "prepaid_order_c": {"type": "boolean", "index": 91, "name": "prepaid_order_c", "comment": null}, "update_subscriptions_only_c": {"type": "boolean", "index": 92, "name": "update_subscriptions_only_c", "comment": null}, "order_auto_activated_c": {"type": "boolean", "index": 93, "name": "order_auto_activated_c", "comment": null}, "synced_to_net_suite_c": {"type": "boolean", "index": 94, "name": "synced_to_net_suite_c", "comment": null}, "purchase_order_number_c": {"type": "integer", "index": 95, "name": "purchase_order_number_c", "comment": null}, "celigo_sfnsio_discount_total_net_suite_c": {"type": "integer", "index": 96, "name": "celigo_sfnsio_discount_total_net_suite_c", "comment": null}, "celigo_sfnsio_net_suite_id_c": {"type": "integer", "index": 97, "name": "celigo_sfnsio_net_suite_id_c", "comment": null}, "celigo_sfnsio_net_suite_order_number_c": {"type": "text", "index": 98, "name": "celigo_sfnsio_net_suite_order_number_c", "comment": null}, "celigo_sfnsio_net_suite_order_status_c": {"type": "integer", "index": 99, "name": "celigo_sfnsio_net_suite_order_status_c", "comment": null}, "celigo_sfnsio_net_suite_record_c": {"type": "text", "index": 100, "name": "celigo_sfnsio_net_suite_record_c", "comment": null}, "celigo_sfnsio_ship_date_c": {"type": "integer", "index": 101, "name": "celigo_sfnsio_ship_date_c", "comment": null}, "celigo_sfnsio_skip_export_to_net_suite_c": {"type": "boolean", "index": 102, "name": "celigo_sfnsio_skip_export_to_net_suite_c", "comment": null}, "celigo_sfnsio_sub_total_net_suite_c": {"type": "integer", "index": 103, "name": "celigo_sfnsio_sub_total_net_suite_c", "comment": null}, "celigo_sfnsio_tax_total_net_suite_c": {"type": "integer", "index": 104, "name": "celigo_sfnsio_tax_total_net_suite_c", "comment": null}, "celigo_sfnsio_test_mode_record_c": {"type": "boolean", "index": 105, "name": "celigo_sfnsio_test_mode_record_c", "comment": null}, "celigo_sfnsio_total_net_suite_c": {"type": "integer", "index": 106, "name": "celigo_sfnsio_total_net_suite_c", "comment": null}, "amend_with_rollover_spend_type_c": {"type": "boolean", "index": 107, "name": "amend_with_rollover_spend_type_c", "comment": null}, "customer_spend_type_c": {"type": "integer", "index": 108, "name": "customer_spend_type_c", "comment": null}, "order_spend_type_c": {"type": "integer", "index": 109, "name": "order_spend_type_c", "comment": null}, "opportunity_id": {"type": "integer", "index": 110, "name": "opportunity_id", "comment": null}, "purchase_summary_c": {"type": "integer", "index": 111, "name": "purchase_summary_c", "comment": null}, "is_hvr_legacy_order_c": {"type": "integer", "index": 112, "name": "is_hvr_legacy_order_c", "comment": null}, "ironclad_workflow_c": {"type": "integer", "index": 113, "name": "ironclad_workflow_c", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 114, "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.salesforce_source.salesforce.order"}, "source.salesforce_source.salesforce.product_2": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_product_2_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"last_referenced_date": {"type": "timestamp without time zone", "index": 1, "name": "last_referenced_date", "comment": null}, "is_active": {"type": "boolean", "index": 2, "name": "is_active", "comment": null}, "description": {"type": "integer", "index": 3, "name": "description", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 4, "name": "last_modified_date", "comment": null}, "record_type_id": {"type": "text", "index": 5, "name": "record_type_id", "comment": null}, "product_code": {"type": "integer", "index": 6, "name": "product_code", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 8, "name": "last_viewed_date", "comment": null}, "is_deleted": {"type": "boolean", "index": 9, "name": "is_deleted", "comment": null}, "last_modified_by_id": {"type": "text", "index": 10, "name": "last_modified_by_id", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 11, "name": "system_modstamp", "comment": null}, "name": {"type": "text", "index": 12, "name": "name", "comment": null}, "id": {"type": "text", "index": 13, "name": "id", "comment": null}, "created_by_id": {"type": "text", "index": 14, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 15, "name": "created_date", "comment": null}, "family": {"type": "text", "index": 16, "name": "family", "comment": null}, "max_volume_c": {"type": "integer", "index": 17, "name": "max_volume_c", "comment": null}, "min_volume_c": {"type": "integer", "index": 18, "name": "min_volume_c", "comment": null}, "request_name_c": {"type": "integer", "index": 19, "name": "request_name_c", "comment": null}, "default_quantity_c": {"type": "integer", "index": 20, "name": "default_quantity_c", "comment": null}, "account_c": {"type": "integer", "index": 21, "name": "account_c", "comment": null}, "related_product_c": {"type": "integer", "index": 22, "name": "related_product_c", "comment": null}, "picklist_value_c": {"type": "integer", "index": 23, "name": "picklist_value_c", "comment": null}, "as_input_c": {"type": "integer", "index": 24, "name": "as_input_c", "comment": null}, "as_output_c": {"type": "integer", "index": 25, "name": "as_output_c", "comment": null}, "status_c": {"type": "integer", "index": 26, "name": "status_c", "comment": null}, "number_of_quantity_installments": {"type": "integer", "index": 27, "name": "number_of_quantity_installments", "comment": null}, "number_of_revenue_installments": {"type": "integer", "index": 28, "name": "number_of_revenue_installments", "comment": null}, "quantity_installment_period": {"type": "integer", "index": 29, "name": "quantity_installment_period", "comment": null}, "quantity_schedule_type": {"type": "integer", "index": 30, "name": "quantity_schedule_type", "comment": null}, "revenue_installment_period": {"type": "integer", "index": 31, "name": "revenue_installment_period", "comment": null}, "revenue_schedule_type": {"type": "integer", "index": 32, "name": "revenue_schedule_type", "comment": null}, "connections_c": {"type": "integer", "index": 33, "name": "connections_c", "comment": null}, "event_volume_c": {"type": "integer", "index": 34, "name": "event_volume_c", "comment": null}, "roadmap_connections_c": {"type": "integer", "index": 35, "name": "roadmap_connections_c", "comment": null}, "row_volume_c": {"type": "integer", "index": 36, "name": "row_volume_c", "comment": null}, "display_url": {"type": "integer", "index": 37, "name": "display_url", "comment": null}, "external_data_source_id": {"type": "integer", "index": 38, "name": "external_data_source_id", "comment": null}, "external_id": {"type": "integer", "index": 39, "name": "external_id", "comment": null}, "quantity_unit_of_measure": {"type": "integer", "index": 40, "name": "quantity_unit_of_measure", "comment": null}, "stock_keeping_unit": {"type": "integer", "index": 41, "name": "stock_keeping_unit", "comment": null}, "features_c": {"type": "integer", "index": 42, "name": "features_c", "comment": null}, "tier_3_price_c": {"type": "integer", "index": 43, "name": "tier_3_price_c", "comment": null}, "tier_2_price_c": {"type": "integer", "index": 44, "name": "tier_2_price_c", "comment": null}, "tier_4_price_c": {"type": "integer", "index": 45, "name": "tier_4_price_c", "comment": null}, "tier_1_price_c": {"type": "integer", "index": 46, "name": "tier_1_price_c", "comment": null}, "netsuite_conn_sync_in_progress_c": {"type": "boolean", "index": 47, "name": "netsuite_conn_sync_in_progress_c", "comment": null}, "netsuite_conn_celigo_update_c": {"type": "boolean", "index": 48, "name": "netsuite_conn_celigo_update_c", "comment": null}, "netsuite_conn_term_contract_pricing_type_c": {"type": "integer", "index": 49, "name": "netsuite_conn_term_contract_pricing_type_c", "comment": null}, "netsuite_conn_net_suite_id_c": {"type": "integer", "index": 50, "name": "netsuite_conn_net_suite_id_c", "comment": null}, "netsuite_conn_net_suite_sync_err_c": {"type": "text", "index": 51, "name": "netsuite_conn_net_suite_sync_err_c", "comment": null}, "netsuite_conn_push_to_net_suite_c": {"type": "boolean", "index": 52, "name": "netsuite_conn_push_to_net_suite_c", "comment": null}, "netsuite_conn_item_category_c": {"type": "integer", "index": 53, "name": "netsuite_conn_item_category_c", "comment": null}, "netsuite_conn_net_suite_item_type_c": {"type": "text", "index": 54, "name": "netsuite_conn_net_suite_item_type_c", "comment": null}, "netsuite_conn_sub_type_c": {"type": "text", "index": 55, "name": "netsuite_conn_sub_type_c", "comment": null}, "is_new_c": {"type": "boolean", "index": 56, "name": "is_new_c", "comment": null}, "product_metadata_c": {"type": "integer", "index": 57, "name": "product_metadata_c", "comment": null}, "product_metadata_del_c": {"type": "integer", "index": 58, "name": "product_metadata_del_c", "comment": null}, "sbqq_asset_amendment_behavior_c": {"type": "text", "index": 59, "name": "sbqq_asset_amendment_behavior_c", "comment": null}, "sbqq_asset_conversion_c": {"type": "text", "index": 60, "name": "sbqq_asset_conversion_c", "comment": null}, "sbqq_batch_quantity_c": {"type": "integer", "index": 61, "name": "sbqq_batch_quantity_c", "comment": null}, "sbqq_billing_frequency_c": {"type": "text", "index": 62, "name": "sbqq_billing_frequency_c", "comment": null}, "sbqq_billing_type_c": {"type": "text", "index": 63, "name": "sbqq_billing_type_c", "comment": null}, "sbqq_block_pricing_field_c": {"type": "text", "index": 64, "name": "sbqq_block_pricing_field_c", "comment": null}, "sbqq_charge_type_c": {"type": "text", "index": 65, "name": "sbqq_charge_type_c", "comment": null}, "sbqq_component_c": {"type": "boolean", "index": 66, "name": "sbqq_component_c", "comment": null}, "sbqq_compound_discount_rate_c": {"type": "integer", "index": 67, "name": "sbqq_compound_discount_rate_c", "comment": null}, "sbqq_configuration_event_c": {"type": "integer", "index": 68, "name": "sbqq_configuration_event_c", "comment": null}, "sbqq_configuration_field_set_c": {"type": "integer", "index": 69, "name": "sbqq_configuration_field_set_c", "comment": null}, "sbqq_configuration_fields_c": {"type": "integer", "index": 70, "name": "sbqq_configuration_fields_c", "comment": null}, "sbqq_configuration_form_title_c": {"type": "integer", "index": 71, "name": "sbqq_configuration_form_title_c", "comment": null}, "sbqq_configuration_type_c": {"type": "integer", "index": 72, "name": "sbqq_configuration_type_c", "comment": null}, "sbqq_configuration_validator_c": {"type": "integer", "index": 73, "name": "sbqq_configuration_validator_c", "comment": null}, "sbqq_configured_code_pattern_c": {"type": "integer", "index": 74, "name": "sbqq_configured_code_pattern_c", "comment": null}, "sbqq_configured_description_pattern_c": {"type": "integer", "index": 75, "name": "sbqq_configured_description_pattern_c", "comment": null}, "sbqq_cost_editable_c": {"type": "boolean", "index": 76, "name": "sbqq_cost_editable_c", "comment": null}, "sbqq_cost_schedule_c": {"type": "integer", "index": 77, "name": "sbqq_cost_schedule_c", "comment": null}, "sbqq_custom_configuration_page_c": {"type": "integer", "index": 78, "name": "sbqq_custom_configuration_page_c", "comment": null}, "sbqq_custom_configuration_required_c": {"type": "boolean", "index": 79, "name": "sbqq_custom_configuration_required_c", "comment": null}, "sbqq_customer_community_availability_c": {"type": "integer", "index": 80, "name": "sbqq_customer_community_availability_c", "comment": null}, "sbqq_default_pricing_table_c": {"type": "integer", "index": 81, "name": "sbqq_default_pricing_table_c", "comment": null}, "sbqq_default_quantity_c": {"type": "integer", "index": 82, "name": "sbqq_default_quantity_c", "comment": null}, "sbqq_description_locked_c": {"type": "boolean", "index": 83, "name": "sbqq_description_locked_c", "comment": null}, "sbqq_discount_category_c": {"type": "integer", "index": 84, "name": "sbqq_discount_category_c", "comment": null}, "sbqq_discount_schedule_c": {"type": "integer", "index": 85, "name": "sbqq_discount_schedule_c", "comment": null}, "sbqq_dynamic_pricing_constraint_c": {"type": "integer", "index": 86, "name": "sbqq_dynamic_pricing_constraint_c", "comment": null}, "sbqq_exclude_from_maintenance_c": {"type": "boolean", "index": 87, "name": "sbqq_exclude_from_maintenance_c", "comment": null}, "sbqq_exclude_from_opportunity_c": {"type": "boolean", "index": 88, "name": "sbqq_exclude_from_opportunity_c", "comment": null}, "sbqq_externally_configurable_c": {"type": "boolean", "index": 89, "name": "sbqq_externally_configurable_c", "comment": null}, "sbqq_generate_contracted_price_c": {"type": "integer", "index": 90, "name": "sbqq_generate_contracted_price_c", "comment": null}, "sbqq_has_configuration_attributes_c": {"type": "boolean", "index": 91, "name": "sbqq_has_configuration_attributes_c", "comment": null}, "sbqq_has_consumption_schedule_c": {"type": "boolean", "index": 92, "name": "sbqq_has_consumption_schedule_c", "comment": null}, "sbqq_hidden_c": {"type": "boolean", "index": 93, "name": "sbqq_hidden_c", "comment": null}, "sbqq_hide_price_in_search_results_c": {"type": "boolean", "index": 94, "name": "sbqq_hide_price_in_search_results_c", "comment": null}, "sbqq_include_in_maintenance_c": {"type": "boolean", "index": 95, "name": "sbqq_include_in_maintenance_c", "comment": null}, "sbqq_new_quote_group_c": {"type": "boolean", "index": 96, "name": "sbqq_new_quote_group_c", "comment": null}, "sbqq_non_discountable_c": {"type": "boolean", "index": 97, "name": "sbqq_non_discountable_c", "comment": null}, "sbqq_non_partner_discountable_c": {"type": "boolean", "index": 98, "name": "sbqq_non_partner_discountable_c", "comment": null}, "sbqq_option_layout_c": {"type": "integer", "index": 99, "name": "sbqq_option_layout_c", "comment": null}, "sbqq_option_selection_method_c": {"type": "text", "index": 100, "name": "sbqq_option_selection_method_c", "comment": null}, "sbqq_optional_c": {"type": "boolean", "index": 101, "name": "sbqq_optional_c", "comment": null}, "sbqq_price_editable_c": {"type": "boolean", "index": 102, "name": "sbqq_price_editable_c", "comment": null}, "sbqq_pricing_method_c": {"type": "text", "index": 103, "name": "sbqq_pricing_method_c", "comment": null}, "sbqq_pricing_method_editable_c": {"type": "boolean", "index": 104, "name": "sbqq_pricing_method_editable_c", "comment": null}, "sbqq_product_picture_id_c": {"type": "integer", "index": 105, "name": "sbqq_product_picture_id_c", "comment": null}, "sbqq_quantity_editable_c": {"type": "boolean", "index": 106, "name": "sbqq_quantity_editable_c", "comment": null}, "sbqq_quantity_scale_c": {"type": "integer", "index": 107, "name": "sbqq_quantity_scale_c", "comment": null}, "sbqq_reconfiguration_disabled_c": {"type": "boolean", "index": 108, "name": "sbqq_reconfiguration_disabled_c", "comment": null}, "sbqq_renewal_product_c": {"type": "integer", "index": 109, "name": "sbqq_renewal_product_c", "comment": null}, "sbqq_sort_order_c": {"type": "integer", "index": 110, "name": "sbqq_sort_order_c", "comment": null}, "sbqq_specifications_c": {"type": "integer", "index": 111, "name": "sbqq_specifications_c", "comment": null}, "sbqq_subscription_base_c": {"type": "text", "index": 112, "name": "sbqq_subscription_base_c", "comment": null}, "sbqq_subscription_category_c": {"type": "integer", "index": 113, "name": "sbqq_subscription_category_c", "comment": null}, "sbqq_subscription_percent_c": {"type": "integer", "index": 114, "name": "sbqq_subscription_percent_c", "comment": null}, "sbqq_subscription_pricing_c": {"type": "text", "index": 115, "name": "sbqq_subscription_pricing_c", "comment": null}, "sbqq_subscription_target_c": {"type": "integer", "index": 116, "name": "sbqq_subscription_target_c", "comment": null}, "sbqq_subscription_term_c": {"type": "integer", "index": 117, "name": "sbqq_subscription_term_c", "comment": null}, "sbqq_subscription_type_c": {"type": "text", "index": 118, "name": "sbqq_subscription_type_c", "comment": null}, "sbqq_tax_code_c": {"type": "integer", "index": 119, "name": "sbqq_tax_code_c", "comment": null}, "sbqq_taxable_c": {"type": "boolean", "index": 120, "name": "sbqq_taxable_c", "comment": null}, "sbqq_term_discount_level_c": {"type": "integer", "index": 121, "name": "sbqq_term_discount_level_c", "comment": null}, "sbqq_term_discount_schedule_c": {"type": "integer", "index": 122, "name": "sbqq_term_discount_schedule_c", "comment": null}, "sbqq_upgrade_credit_c": {"type": "integer", "index": 123, "name": "sbqq_upgrade_credit_c", "comment": null}, "sbqq_upgrade_ratio_c": {"type": "integer", "index": 124, "name": "sbqq_upgrade_ratio_c", "comment": null}, "sbqq_upgrade_source_c": {"type": "integer", "index": 125, "name": "sbqq_upgrade_source_c", "comment": null}, "sbqq_upgrade_target_c": {"type": "integer", "index": 126, "name": "sbqq_upgrade_target_c", "comment": null}, "connector_type_c": {"type": "text", "index": 127, "name": "connector_type_c", "comment": null}, "pbf_pro_type_discount_c": {"type": "boolean", "index": 128, "name": "pbf_pro_type_discount_c", "comment": null}, "dimension_c": {"type": "text", "index": 129, "name": "dimension_c", "comment": null}, "connector_status_c": {"type": "text", "index": 130, "name": "connector_status_c", "comment": null}, "dimension_definition_c": {"type": "integer", "index": 131, "name": "dimension_definition_c", "comment": null}, "ava_sfcpq_tax_code_c": {"type": "integer", "index": 132, "name": "ava_sfcpq_tax_code_c", "comment": null}, "paid_consumption_c": {"type": "integer", "index": 133, "name": "paid_consumption_c", "comment": null}, "is_complimentary_c": {"type": "boolean", "index": 134, "name": "is_complimentary_c", "comment": null}, "product_external_id_c": {"type": "integer", "index": 135, "name": "product_external_id_c", "comment": null}, "blng_billing_rule_c": {"type": "text", "index": 136, "name": "blng_billing_rule_c", "comment": null}, "blng_revenue_recognition_rule_c": {"type": "text", "index": 137, "name": "blng_revenue_recognition_rule_c", "comment": null}, "blng_tax_rule_c": {"type": "text", "index": 138, "name": "blng_tax_rule_c", "comment": null}, "deployment_date_c": {"type": "integer", "index": 139, "name": "deployment_date_c", "comment": null}, "do_not_prorate_c": {"type": "boolean", "index": 140, "name": "do_not_prorate_c", "comment": null}, "celigo_sfnsio_netsuite_id_c": {"type": "integer", "index": 141, "name": "celigo_sfnsio_netsuite_id_c", "comment": null}, "sbqq_enable_large_configuration_c": {"type": "boolean", "index": 142, "name": "sbqq_enable_large_configuration_c", "comment": null}, "sbqq_pricing_guidance_c": {"type": "integer", "index": 143, "name": "sbqq_pricing_guidance_c", "comment": null}, "celigo_sfnsio_item_pricing_type_c": {"type": "integer", "index": 144, "name": "celigo_sfnsio_item_pricing_type_c", "comment": null}, "celigo_sfnsio_test_mode_record_c": {"type": "boolean", "index": 145, "name": "celigo_sfnsio_test_mode_record_c", "comment": null}, "celigo_sfnsio_celigo_last_modified_date_c": {"type": "timestamp without time zone", "index": 146, "name": "celigo_sfnsio_celigo_last_modified_date_c", "comment": null}, "celigo_sfnsio_net_suite_record_c": {"type": "integer", "index": 147, "name": "celigo_sfnsio_net_suite_record_c", "comment": null}, "celigo_sfnsio_skip_export_to_net_suite_c": {"type": "boolean", "index": 148, "name": "celigo_sfnsio_skip_export_to_net_suite_c", "comment": null}, "celigo_sfnsio_net_suite_item_type_c": {"type": "integer", "index": 149, "name": "celigo_sfnsio_net_suite_item_type_c", "comment": null}, "celigo_sfnsio_net_suite_id_c": {"type": "integer", "index": 150, "name": "celigo_sfnsio_net_suite_id_c", "comment": null}, "promo_code_c": {"type": "integer", "index": 151, "name": "promo_code_c", "comment": null}, "product_category_c": {"type": "integer", "index": 152, "name": "product_category_c", "comment": null}, "product_source_c": {"type": "integer", "index": 153, "name": "product_source_c", "comment": null}, "non_recurring_c": {"type": "boolean", "index": 154, "name": "non_recurring_c", "comment": null}, "is_archived": {"type": "boolean", "index": 155, "name": "is_archived", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 156, "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.salesforce_source.salesforce.product_2"}, "source.salesforce_source.salesforce.task": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_task_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"referral_account_c": {"type": "integer", "index": 1, "name": "referral_account_c", "comment": null}, "who_id": {"type": "text", "index": 2, "name": "who_id", "comment": null}, "call_disposition": {"type": "integer", "index": 3, "name": "call_disposition", "comment": null}, "recurrence_day_of_month": {"type": "integer", "index": 4, "name": "recurrence_day_of_month", "comment": null}, "owner_id": {"type": "text", "index": 5, "name": "owner_id", "comment": null}, "recurrence_end_date_only": {"type": "timestamp without time zone", "index": 6, "name": "recurrence_end_date_only", "comment": null}, "subject": {"type": "text", "index": 7, "name": "subject", "comment": null}, "description": {"type": "text", "index": 8, "name": "description", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 9, "name": "last_modified_date", "comment": null}, "recurrence_time_zone_sid_key": {"type": "integer", "index": 10, "name": "recurrence_time_zone_sid_key", "comment": null}, "is_recurrence": {"type": "boolean", "index": 11, "name": "is_recurrence", "comment": null}, "what_count": {"type": "integer", "index": 12, "name": "what_count", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 13, "name": "_fivetran_synced", "comment": null}, "call_object": {"type": "integer", "index": 14, "name": "call_object", "comment": null}, "is_deleted": {"type": "boolean", "index": 15, "name": "is_deleted", "comment": null}, "recurrence_day_of_week_mask": {"type": "integer", "index": 16, "name": "recurrence_day_of_week_mask", "comment": null}, "last_modified_by_id": {"type": "text", "index": 17, "name": "last_modified_by_id", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 18, "name": "system_modstamp", "comment": null}, "recurrence_regenerated_type": {"type": "integer", "index": 19, "name": "recurrence_regenerated_type", "comment": null}, "id": {"type": "text", "index": 20, "name": "id", "comment": null}, "recurrence_type": {"type": "integer", "index": 21, "name": "recurrence_type", "comment": null}, "reminder_date_time": {"type": "timestamp without time zone", "index": 22, "name": "reminder_date_time", "comment": null}, "call_type": {"type": "integer", "index": 23, "name": "call_type", "comment": null}, "is_high_priority": {"type": "boolean", "index": 24, "name": "is_high_priority", "comment": null}, "is_closed": {"type": "boolean", "index": 25, "name": "is_closed", "comment": null}, "recurrence_month_of_year": {"type": "integer", "index": 26, "name": "recurrence_month_of_year", "comment": null}, "is_reminder_set": {"type": "boolean", "index": 27, "name": "is_reminder_set", "comment": null}, "activity_date": {"type": "timestamp without time zone", "index": 28, "name": "activity_date", "comment": null}, "recurrence_instance": {"type": "integer", "index": 29, "name": "recurrence_instance", "comment": null}, "priority": {"type": "text", "index": 30, "name": "priority", "comment": null}, "recurrence_interval": {"type": "integer", "index": 31, "name": "recurrence_interval", "comment": null}, "who_count": {"type": "integer", "index": 32, "name": "who_count", "comment": null}, "recurrence_start_date_only": {"type": "timestamp without time zone", "index": 33, "name": "recurrence_start_date_only", "comment": null}, "account_id": {"type": "text", "index": 34, "name": "account_id", "comment": null}, "referral_contact_c": {"type": "integer", "index": 35, "name": "referral_contact_c", "comment": null}, "call_duration_in_seconds": {"type": "integer", "index": 36, "name": "call_duration_in_seconds", "comment": null}, "created_by_id": {"type": "text", "index": 37, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 38, "name": "created_date", "comment": null}, "recurrence_activity_id": {"type": "integer", "index": 39, "name": "recurrence_activity_id", "comment": null}, "what_id": {"type": "text", "index": 40, "name": "what_id", "comment": null}, "task_subtype": {"type": "text", "index": 41, "name": "task_subtype", "comment": null}, "status": {"type": "text", "index": 42, "name": "status", "comment": null}, "invitee_uuid_c": {"type": "integer", "index": 43, "name": "invitee_uuid_c", "comment": null}, "type": {"type": "text", "index": 44, "name": "type", "comment": null}, "no_show_c": {"type": "boolean", "index": 45, "name": "no_show_c", "comment": null}, "first_meeting_held_c": {"type": "integer", "index": 46, "name": "first_meeting_held_c", "comment": null}, "associated_sdr_c": {"type": "integer", "index": 47, "name": "associated_sdr_c", "comment": null}, "first_meeting_c": {"type": "integer", "index": 48, "name": "first_meeting_c", "comment": null}, "call_recording_c": {"type": "integer", "index": 49, "name": "call_recording_c", "comment": null}, "affectlayer_chorus_call_id_c": {"type": "integer", "index": 50, "name": "affectlayer_chorus_call_id_c", "comment": null}, "affectlayer_affect_layer_call_id_c": {"type": "integer", "index": 51, "name": "affectlayer_affect_layer_call_id_c", "comment": null}, "last_rep_activity_date_c": {"type": "integer", "index": 52, "name": "last_rep_activity_date_c", "comment": null}, "lid_url_c": {"type": "integer", "index": 53, "name": "lid_url_c", "comment": null}, "lid_date_sent_c": {"type": "integer", "index": 54, "name": "lid_date_sent_c", "comment": null}, "record_type_id": {"type": "text", "index": 55, "name": "record_type_id", "comment": null}, "sales_loft_step_id_c": {"type": "integer", "index": 56, "name": "sales_loft_step_id_c", "comment": null}, "sales_loft_step_name_c": {"type": "integer", "index": 57, "name": "sales_loft_step_name_c", "comment": null}, "sales_loft_step_type_c": {"type": "integer", "index": 58, "name": "sales_loft_step_type_c", "comment": null}, "sales_loft_email_template_id_c": {"type": "integer", "index": 59, "name": "sales_loft_email_template_id_c", "comment": null}, "sales_loft_external_identifier_c": {"type": "integer", "index": 60, "name": "sales_loft_external_identifier_c", "comment": null}, "sales_loft_cadence_id_c": {"type": "integer", "index": 61, "name": "sales_loft_cadence_id_c", "comment": null}, "sales_loft_clicked_count_c": {"type": "integer", "index": 62, "name": "sales_loft_clicked_count_c", "comment": null}, "sales_loft_cadence_name_c": {"type": "integer", "index": 63, "name": "sales_loft_cadence_name_c", "comment": null}, "sales_loft_reply_count_c": {"type": "integer", "index": 64, "name": "sales_loft_reply_count_c", "comment": null}, "call_disposition_c": {"type": "integer", "index": 65, "name": "call_disposition_c", "comment": null}, "sales_loft_email_template_title_c": {"type": "integer", "index": 66, "name": "sales_loft_email_template_title_c", "comment": null}, "sales_loft_step_day_new_c": {"type": "integer", "index": 67, "name": "sales_loft_step_day_new_c", "comment": null}, "call_disposition_2_c": {"type": "integer", "index": 68, "name": "call_disposition_2_c", "comment": null}, "sales_loft_viewed_count_c": {"type": "integer", "index": 69, "name": "sales_loft_viewed_count_c", "comment": null}, "sales_loft_1_sales_loft_step_day_c": {"type": "integer", "index": 70, "name": "sales_loft_1_sales_loft_step_day_c", "comment": null}, "sales_loft_1_sales_loft_clicked_count_c": {"type": "integer", "index": 71, "name": "sales_loft_1_sales_loft_clicked_count_c", "comment": null}, "sales_loft_1_sales_loft_view_count_c": {"type": "integer", "index": 72, "name": "sales_loft_1_sales_loft_view_count_c", "comment": null}, "sales_loft_1_call_disposition_c": {"type": "integer", "index": 73, "name": "sales_loft_1_call_disposition_c", "comment": null}, "sales_loft_1_sales_loft_replies_count_c": {"type": "integer", "index": 74, "name": "sales_loft_1_sales_loft_replies_count_c", "comment": null}, "sales_loft_1_sales_loft_cadence_name_c": {"type": "integer", "index": 75, "name": "sales_loft_1_sales_loft_cadence_name_c", "comment": null}, "sales_loft_1_call_sentiment_c": {"type": "integer", "index": 76, "name": "sales_loft_1_call_sentiment_c", "comment": null}, "sales_loft_1_sales_loft_email_template_title_c": {"type": "integer", "index": 77, "name": "sales_loft_1_sales_loft_email_template_title_c", "comment": null}, "completed_date_time": {"type": "timestamp without time zone", "index": 78, "name": "completed_date_time", "comment": null}, "is_a_co_sell_activity_c": {"type": "integer", "index": 79, "name": "is_a_co_sell_activity_c", "comment": null}, "partner_contact_c": {"type": "integer", "index": 80, "name": "partner_contact_c", "comment": null}, "co_selling_activity_c": {"type": "integer", "index": 81, "name": "co_selling_activity_c", "comment": null}, "description_c": {"type": "integer", "index": 82, "name": "description_c", "comment": null}, "co_sell_partner_account_c": {"type": "integer", "index": 83, "name": "co_sell_partner_account_c", "comment": null}, "campaign_c": {"type": "integer", "index": 84, "name": "campaign_c", "comment": null}, "partner_account_c": {"type": "integer", "index": 85, "name": "partner_account_c", "comment": null}, "topic_c": {"type": "integer", "index": 86, "name": "topic_c", "comment": null}, "event_name_c": {"type": "integer", "index": 87, "name": "event_name_c", "comment": null}, "attendance_number_c": {"type": "integer", "index": 88, "name": "attendance_number_c", "comment": null}, "partner_activity_type_c": {"type": "integer", "index": 89, "name": "partner_activity_type_c", "comment": null}, "proof_of_referral_c": {"type": "integer", "index": 90, "name": "proof_of_referral_c", "comment": null}, "how_did_you_bring_value_or_create_trust_c": {"type": "integer", "index": 91, "name": "how_did_you_bring_value_or_create_trust_c", "comment": null}, "how_did_you_bring_value_or_earn_trust_c": {"type": "integer", "index": 92, "name": "how_did_you_bring_value_or_earn_trust_c", "comment": null}, "duration_in_minutes_c": {"type": "integer", "index": 93, "name": "duration_in_minutes_c", "comment": null}, "vidyard_c": {"type": "boolean", "index": 94, "name": "vidyard_c", "comment": null}, "expected_payment_date_c": {"type": "integer", "index": 95, "name": "expected_payment_date_c", "comment": null}, "execute_collections_plan_activity_c": {"type": "boolean", "index": 96, "name": "execute_collections_plan_activity_c", "comment": null}, "collections_hold_c": {"type": "boolean", "index": 97, "name": "collections_hold_c", "comment": null}, "opportunity_c": {"type": "integer", "index": 98, "name": "opportunity_c", "comment": null}, "meeting_type_c": {"type": "text", "index": 99, "name": "meeting_type_c", "comment": null}, "meeting_name_c": {"type": "text", "index": 100, "name": "meeting_name_c", "comment": null}, "bizible_2_bizible_id_c": {"type": "integer", "index": 101, "name": "bizible_2_bizible_id_c", "comment": null}, "bizible_2_bizible_touchpoint_date_c": {"type": "integer", "index": 102, "name": "bizible_2_bizible_touchpoint_date_c", "comment": null}, "assigned_to_role_c": {"type": "text", "index": 103, "name": "assigned_to_role_c", "comment": null}, "assigned_to_name_c": {"type": "text", "index": 104, "name": "assigned_to_name_c", "comment": null}, "legacy_hvr_id_c": {"type": "integer", "index": 105, "name": "legacy_hvr_id_c", "comment": null}, "is_archived": {"type": "boolean", "index": 106, "name": "is_archived", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 107, "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.salesforce_source.salesforce.task"}, "source.salesforce_source.salesforce.user": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_user_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}, "about_me": {"type": "integer", "index": 3, "name": "about_me", "comment": null}, "account_id": {"type": "integer", "index": 4, "name": "account_id", "comment": null}, "alias": {"type": "text", "index": 5, "name": "alias", "comment": null}, "badge_text": {"type": "text", "index": 6, "name": "badge_text", "comment": null}, "banner_photo_url": {"type": "text", "index": 7, "name": "banner_photo_url", "comment": null}, "call_center_id": {"type": "integer", "index": 8, "name": "call_center_id", "comment": null}, "city": {"type": "integer", "index": 9, "name": "city", "comment": null}, "community_nickname": {"type": "text", "index": 10, "name": "community_nickname", "comment": null}, "company_name": {"type": "integer", "index": 11, "name": "company_name", "comment": null}, "contact_id": {"type": "integer", "index": 12, "name": "contact_id", "comment": null}, "country": {"type": "text", "index": 13, "name": "country", "comment": null}, "country_code": {"type": "text", "index": 14, "name": "country_code", "comment": null}, "default_group_notification_frequency": {"type": "text", "index": 15, "name": "default_group_notification_frequency", "comment": null}, "delegated_approver_id": {"type": "text", "index": 16, "name": "delegated_approver_id", "comment": null}, "department": {"type": "integer", "index": 17, "name": "department", "comment": null}, "digest_frequency": {"type": "text", "index": 18, "name": "digest_frequency", "comment": null}, "division": {"type": "integer", "index": 19, "name": "division", "comment": null}, "email": {"type": "text", "index": 20, "name": "email", "comment": null}, "email_encoding_key": {"type": "text", "index": 21, "name": "email_encoding_key", "comment": null}, "email_preferences_auto_bcc": {"type": "boolean", "index": 22, "name": "email_preferences_auto_bcc", "comment": null}, "employee_number": {"type": "integer", "index": 23, "name": "employee_number", "comment": null}, "extension": {"type": "integer", "index": 24, "name": "extension", "comment": null}, "fax": {"type": "integer", "index": 25, "name": "fax", "comment": null}, "federation_identifier": {"type": "integer", "index": 26, "name": "federation_identifier", "comment": null}, "first_name": {"type": "text", "index": 27, "name": "first_name", "comment": null}, "forecast_enabled": {"type": "boolean", "index": 28, "name": "forecast_enabled", "comment": null}, "full_photo_url": {"type": "text", "index": 29, "name": "full_photo_url", "comment": null}, "geocode_accuracy": {"type": "integer", "index": 30, "name": "geocode_accuracy", "comment": null}, "id": {"type": "text", "index": 31, "name": "id", "comment": null}, "individual_id": {"type": "integer", "index": 32, "name": "individual_id", "comment": null}, "is_active": {"type": "boolean", "index": 33, "name": "is_active", "comment": null}, "is_profile_photo_active": {"type": "boolean", "index": 34, "name": "is_profile_photo_active", "comment": null}, "language_locale_key": {"type": "text", "index": 35, "name": "language_locale_key", "comment": null}, "last_login_date": {"type": "timestamp without time zone", "index": 36, "name": "last_login_date", "comment": null}, "last_name": {"type": "text", "index": 37, "name": "last_name", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 38, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 39, "name": "last_viewed_date", "comment": null}, "latitude": {"type": "double precision", "index": 40, "name": "latitude", "comment": null}, "locale_sid_key": {"type": "text", "index": 41, "name": "locale_sid_key", "comment": null}, "longitude": {"type": "double precision", "index": 42, "name": "longitude", "comment": null}, "manager_id": {"type": "text", "index": 43, "name": "manager_id", "comment": null}, "medium_banner_photo_url": {"type": "text", "index": 44, "name": "medium_banner_photo_url", "comment": null}, "mobile_phone": {"type": "integer", "index": 45, "name": "mobile_phone", "comment": null}, "name": {"type": "text", "index": 46, "name": "name", "comment": null}, "offline_trial_expiration_date": {"type": "timestamp without time zone", "index": 47, "name": "offline_trial_expiration_date", "comment": null}, "phone": {"type": "text", "index": 48, "name": "phone", "comment": null}, "postal_code": {"type": "integer", "index": 49, "name": "postal_code", "comment": null}, "profile_id": {"type": "text", "index": 50, "name": "profile_id", "comment": null}, "receives_admin_info_emails": {"type": "boolean", "index": 51, "name": "receives_admin_info_emails", "comment": null}, "receives_info_emails": {"type": "boolean", "index": 52, "name": "receives_info_emails", "comment": null}, "sender_email": {"type": "integer", "index": 53, "name": "sender_email", "comment": null}, "sender_name": {"type": "integer", "index": 54, "name": "sender_name", "comment": null}, "signature": {"type": "integer", "index": 55, "name": "signature", "comment": null}, "small_banner_photo_url": {"type": "text", "index": 56, "name": "small_banner_photo_url", "comment": null}, "small_photo_url": {"type": "text", "index": 57, "name": "small_photo_url", "comment": null}, "state": {"type": "integer", "index": 58, "name": "state", "comment": null}, "state_code": {"type": "integer", "index": 59, "name": "state_code", "comment": null}, "street": {"type": "integer", "index": 60, "name": "street", "comment": null}, "time_zone_sid_key": {"type": "text", "index": 61, "name": "time_zone_sid_key", "comment": null}, "title": {"type": "text", "index": 62, "name": "title", "comment": null}, "user_role_id": {"type": "text", "index": 63, "name": "user_role_id", "comment": null}, "user_type": {"type": "text", "index": 64, "name": "user_type", "comment": null}, "username": {"type": "text", "index": 65, "name": "username", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 66, "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.salesforce_source.salesforce.user"}, "source.salesforce_source.salesforce.user_role": {"metadata": {"type": "BASE TABLE", "schema": "salesforce_source_integrations_tests_3", "name": "sf_user_role_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}, "case_access_for_account_owner": {"type": "text", "index": 3, "name": "case_access_for_account_owner", "comment": null}, "contact_access_for_account_owner": {"type": "text", "index": 4, "name": "contact_access_for_account_owner", "comment": null}, "developer_name": {"type": "text", "index": 5, "name": "developer_name", "comment": null}, "forecast_user_id": {"type": "integer", "index": 6, "name": "forecast_user_id", "comment": null}, "id": {"type": "text", "index": 7, "name": "id", "comment": null}, "may_forecast_manager_share": {"type": "boolean", "index": 8, "name": "may_forecast_manager_share", "comment": null}, "name": {"type": "text", "index": 9, "name": "name", "comment": null}, "opportunity_access_for_account_owner": {"type": "text", "index": 10, "name": "opportunity_access_for_account_owner", "comment": null}, "parent_role_id": {"type": "text", "index": 11, "name": "parent_role_id", "comment": null}, "portal_type": {"type": "text", "index": 12, "name": "portal_type", "comment": null}, "rollup_description": {"type": "text", "index": 13, "name": "rollup_description", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 14, "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.salesforce_source.salesforce.user_role"}}, "errors": null} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/catalog/v1.json", "dbt_version": "1.8.3", "generated_at": "2024-07-10T01:17:32.019623Z", "invocation_id": "5cb841b5-e5cf-490f-8f23-4c9cf5d27c80", "env": {}}, "nodes": {"seed.salesforce_source_integration_tests.sf_account_data": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_account_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_number": {"type": "integer", "index": 2, "name": "account_number", "comment": null}, "account_source": {"type": "text", "index": 3, "name": "account_source", "comment": null}, "annual_revenue": {"type": "double precision", "index": 4, "name": "annual_revenue", "comment": null}, "billing_city": {"type": "text", "index": 5, "name": "billing_city", "comment": null}, "billing_country": {"type": "text", "index": 6, "name": "billing_country", "comment": null}, "billing_country_code": {"type": "text", "index": 7, "name": "billing_country_code", "comment": null}, "billing_geocode_accuracy": {"type": "integer", "index": 8, "name": "billing_geocode_accuracy", "comment": null}, "billing_latitude": {"type": "double precision", "index": 9, "name": "billing_latitude", "comment": null}, "billing_longitude": {"type": "double precision", "index": 10, "name": "billing_longitude", "comment": null}, "billing_postal_code": {"type": "text", "index": 11, "name": "billing_postal_code", "comment": null}, "billing_state": {"type": "text", "index": 12, "name": "billing_state", "comment": null}, "billing_state_code": {"type": "text", "index": 13, "name": "billing_state_code", "comment": null}, "billing_street": {"type": "text", "index": 14, "name": "billing_street", "comment": null}, "description": {"type": "text", "index": 15, "name": "description", "comment": null}, "fax": {"type": "integer", "index": 16, "name": "fax", "comment": null}, "id": {"type": "text", "index": 17, "name": "id", "comment": null}, "industry": {"type": "text", "index": 18, "name": "industry", "comment": null}, "is_deleted": {"type": "boolean", "index": 19, "name": "is_deleted", "comment": null}, "jigsaw_company_id": {"type": "integer", "index": 20, "name": "jigsaw_company_id", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 21, "name": "last_activity_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 22, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 23, "name": "last_viewed_date", "comment": null}, "master_record_id": {"type": "text", "index": 24, "name": "master_record_id", "comment": null}, "name": {"type": "text", "index": 25, "name": "name", "comment": null}, "number_of_employees": {"type": "integer", "index": 26, "name": "number_of_employees", "comment": null}, "owner_id": {"type": "text", "index": 27, "name": "owner_id", "comment": null}, "ownership": {"type": "integer", "index": 28, "name": "ownership", "comment": null}, "parent_id": {"type": "integer", "index": 29, "name": "parent_id", "comment": null}, "phone": {"type": "text", "index": 30, "name": "phone", "comment": null}, "photo_url": {"type": "text", "index": 31, "name": "photo_url", "comment": null}, "rating": {"type": "integer", "index": 32, "name": "rating", "comment": null}, "record_type_id": {"type": "text", "index": 33, "name": "record_type_id", "comment": null}, "shipping_city": {"type": "integer", "index": 34, "name": "shipping_city", "comment": null}, "shipping_country": {"type": "text", "index": 35, "name": "shipping_country", "comment": null}, "shipping_country_code": {"type": "text", "index": 36, "name": "shipping_country_code", "comment": null}, "shipping_geocode_accuracy": {"type": "integer", "index": 37, "name": "shipping_geocode_accuracy", "comment": null}, "shipping_latitude": {"type": "double precision", "index": 38, "name": "shipping_latitude", "comment": null}, "shipping_longitude": {"type": "double precision", "index": 39, "name": "shipping_longitude", "comment": null}, "shipping_postal_code": {"type": "integer", "index": 40, "name": "shipping_postal_code", "comment": null}, "shipping_state": {"type": "integer", "index": 41, "name": "shipping_state", "comment": null}, "shipping_state_code": {"type": "integer", "index": 42, "name": "shipping_state_code", "comment": null}, "shipping_street": {"type": "integer", "index": 43, "name": "shipping_street", "comment": null}, "sic": {"type": "integer", "index": 44, "name": "sic", "comment": null}, "sic_desc": {"type": "integer", "index": 45, "name": "sic_desc", "comment": null}, "site": {"type": "integer", "index": 46, "name": "site", "comment": null}, "ticker_symbol": {"type": "integer", "index": 47, "name": "ticker_symbol", "comment": null}, "type": {"type": "text", "index": 48, "name": "type", "comment": null}, "website": {"type": "text", "index": 49, "name": "website", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 50, "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.salesforce_source_integration_tests.sf_account_data"}, "seed.salesforce_source_integration_tests.sf_account_history_data": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_account_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_active": {"type": "boolean", "index": 1, "name": "_fivetran_active", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_end", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "account_number": {"type": "integer", "index": 5, "name": "account_number", "comment": null}, "account_source": {"type": "text", "index": 6, "name": "account_source", "comment": null}, "annual_revenue": {"type": "double precision", "index": 7, "name": "annual_revenue", "comment": null}, "billing_city": {"type": "text", "index": 8, "name": "billing_city", "comment": null}, "billing_country": {"type": "text", "index": 9, "name": "billing_country", "comment": null}, "billing_postal_code": {"type": "text", "index": 10, "name": "billing_postal_code", "comment": null}, "billing_state": {"type": "text", "index": 11, "name": "billing_state", "comment": null}, "billing_street": {"type": "text", "index": 12, "name": "billing_street", "comment": null}, "description": {"type": "text", "index": 13, "name": "description", "comment": null}, "id": {"type": "text", "index": 14, "name": "id", "comment": null}, "industry": {"type": "text", "index": 15, "name": "industry", "comment": null}, "is_deleted": {"type": "boolean", "index": 16, "name": "is_deleted", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 17, "name": "last_activity_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 18, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 19, "name": "last_viewed_date", "comment": null}, "master_record_id": {"type": "text", "index": 20, "name": "master_record_id", "comment": null}, "name": {"type": "text", "index": 21, "name": "name", "comment": null}, "number_of_employees": {"type": "integer", "index": 22, "name": "number_of_employees", "comment": null}, "owner_id": {"type": "text", "index": 23, "name": "owner_id", "comment": null}, "ownership": {"type": "integer", "index": 24, "name": "ownership", "comment": null}, "parent_id": {"type": "integer", "index": 25, "name": "parent_id", "comment": null}, "rating": {"type": "integer", "index": 26, "name": "rating", "comment": null}, "record_type_id": {"type": "text", "index": 27, "name": "record_type_id", "comment": null}, "shipping_city": {"type": "integer", "index": 28, "name": "shipping_city", "comment": null}, "shipping_country": {"type": "text", "index": 29, "name": "shipping_country", "comment": null}, "shipping_postal_code": {"type": "integer", "index": 30, "name": "shipping_postal_code", "comment": null}, "shipping_state": {"type": "integer", "index": 31, "name": "shipping_state", "comment": null}, "shipping_street": {"type": "integer", "index": 32, "name": "shipping_street", "comment": null}, "type": {"type": "text", "index": 33, "name": "type", "comment": null}, "website": {"type": "text", "index": 34, "name": "website", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.salesforce_source_integration_tests.sf_account_history_data"}, "seed.salesforce_source_integration_tests.sf_contact_data": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_contact_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "cbit_clearbit_c": {"type": "text", "index": 4, "name": "cbit_clearbit_c", "comment": null}, "cbit_clearbit_ready_c": {"type": "boolean", "index": 5, "name": "cbit_clearbit_ready_c", "comment": null}, "created_by_id": {"type": "text", "index": 6, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 7, "name": "created_date", "comment": null}, "department": {"type": "integer", "index": 8, "name": "department", "comment": null}, "email": {"type": "text", "index": 9, "name": "email", "comment": null}, "email_bounced_date": {"type": "timestamp without time zone", "index": 10, "name": "email_bounced_date", "comment": null}, "email_bounced_reason": {"type": "integer", "index": 11, "name": "email_bounced_reason", "comment": null}, "fax": {"type": "integer", "index": 12, "name": "fax", "comment": null}, "first_name": {"type": "text", "index": 13, "name": "first_name", "comment": null}, "is_deleted": {"type": "boolean", "index": 14, "name": "is_deleted", "comment": null}, "is_email_bounced": {"type": "boolean", "index": 15, "name": "is_email_bounced", "comment": null}, "jigsaw_contact_id": {"type": "integer", "index": 16, "name": "jigsaw_contact_id", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 17, "name": "last_activity_date", "comment": null}, "last_curequest_date": {"type": "timestamp without time zone", "index": 18, "name": "last_curequest_date", "comment": null}, "last_cuupdate_date": {"type": "timestamp without time zone", "index": 19, "name": "last_cuupdate_date", "comment": null}, "last_modified_by_id": {"type": "text", "index": 20, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 21, "name": "last_modified_date", "comment": null}, "last_name": {"type": "text", "index": 22, "name": "last_name", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 23, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 24, "name": "last_viewed_date", "comment": null}, "mailing_city": {"type": "text", "index": 25, "name": "mailing_city", "comment": null}, "mailing_country": {"type": "text", "index": 26, "name": "mailing_country", "comment": null}, "mailing_country_code": {"type": "text", "index": 27, "name": "mailing_country_code", "comment": null}, "mailing_geocode_accuracy": {"type": "integer", "index": 28, "name": "mailing_geocode_accuracy", "comment": null}, "mailing_latitude": {"type": "integer", "index": 29, "name": "mailing_latitude", "comment": null}, "mailing_longitude": {"type": "integer", "index": 30, "name": "mailing_longitude", "comment": null}, "mailing_postal_code": {"type": "integer", "index": 31, "name": "mailing_postal_code", "comment": null}, "mailing_state": {"type": "text", "index": 32, "name": "mailing_state", "comment": null}, "mailing_state_code": {"type": "text", "index": 33, "name": "mailing_state_code", "comment": null}, "mailing_street": {"type": "text", "index": 34, "name": "mailing_street", "comment": null}, "master_record_id": {"type": "integer", "index": 35, "name": "master_record_id", "comment": null}, "mc_4_sf_mc_subscriber_c": {"type": "integer", "index": 36, "name": "mc_4_sf_mc_subscriber_c", "comment": null}, "mobile_phone": {"type": "integer", "index": 37, "name": "mobile_phone", "comment": null}, "name": {"type": "text", "index": 38, "name": "name", "comment": null}, "owner_id": {"type": "text", "index": 39, "name": "owner_id", "comment": null}, "phone": {"type": "text", "index": 40, "name": "phone", "comment": null}, "photo_url": {"type": "text", "index": 41, "name": "photo_url", "comment": null}, "reports_to_id": {"type": "integer", "index": 42, "name": "reports_to_id", "comment": null}, "salutation": {"type": "integer", "index": 43, "name": "salutation", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 44, "name": "system_modstamp", "comment": null}, "title": {"type": "text", "index": 45, "name": "title", "comment": null}, "email_bounced_c": {"type": "boolean", "index": 46, "name": "email_bounced_c", "comment": null}, "email_quality_unknown_c": {"type": "boolean", "index": 47, "name": "email_quality_unknown_c", "comment": null}, "gclid_c": {"type": "integer", "index": 48, "name": "gclid_c", "comment": null}, "referral_account_c": {"type": "integer", "index": 49, "name": "referral_account_c", "comment": null}, "referral_contact_c": {"type": "integer", "index": 50, "name": "referral_contact_c", "comment": null}, "has_opted_out_of_email": {"type": "boolean", "index": 51, "name": "has_opted_out_of_email", "comment": null}, "act_on_lead_score_c": {"type": "integer", "index": 52, "name": "act_on_lead_score_c", "comment": null}, "cbit_created_by_clearbit_c": {"type": "boolean", "index": 53, "name": "cbit_created_by_clearbit_c", "comment": null}, "fivetran_user_id_c": {"type": "integer", "index": 54, "name": "fivetran_user_id_c", "comment": null}, "no_longer_at_company_c": {"type": "boolean", "index": 55, "name": "no_longer_at_company_c", "comment": null}, "pi_campaign_c": {"type": "text", "index": 56, "name": "pi_campaign_c", "comment": null}, "pi_comments_c": {"type": "integer", "index": 57, "name": "pi_comments_c", "comment": null}, "pi_conversion_date_c": {"type": "integer", "index": 58, "name": "pi_conversion_date_c", "comment": null}, "pi_conversion_object_name_c": {"type": "integer", "index": 59, "name": "pi_conversion_object_name_c", "comment": null}, "pi_conversion_object_type_c": {"type": "integer", "index": 60, "name": "pi_conversion_object_type_c", "comment": null}, "pi_created_date_c": {"type": "timestamp without time zone", "index": 61, "name": "pi_created_date_c", "comment": null}, "pi_first_activity_c": {"type": "integer", "index": 62, "name": "pi_first_activity_c", "comment": null}, "pi_first_search_term_c": {"type": "integer", "index": 63, "name": "pi_first_search_term_c", "comment": null}, "pi_first_search_type_c": {"type": "integer", "index": 64, "name": "pi_first_search_type_c", "comment": null}, "pi_first_touch_url_c": {"type": "integer", "index": 65, "name": "pi_first_touch_url_c", "comment": null}, "pi_grade_c": {"type": "integer", "index": 66, "name": "pi_grade_c", "comment": null}, "pi_last_activity_c": {"type": "integer", "index": 67, "name": "pi_last_activity_c", "comment": null}, "pi_needs_score_synced_c": {"type": "boolean", "index": 68, "name": "pi_needs_score_synced_c", "comment": null}, "pi_notes_c": {"type": "integer", "index": 69, "name": "pi_notes_c", "comment": null}, "pi_pardot_hard_bounced_c": {"type": "boolean", "index": 70, "name": "pi_pardot_hard_bounced_c", "comment": null}, "pi_pardot_last_scored_at_c": {"type": "integer", "index": 71, "name": "pi_pardot_last_scored_at_c", "comment": null}, "pi_score_c": {"type": "integer", "index": 72, "name": "pi_score_c", "comment": null}, "pi_url_c": {"type": "text", "index": 73, "name": "pi_url_c", "comment": null}, "pi_utm_campaign_c": {"type": "integer", "index": 74, "name": "pi_utm_campaign_c", "comment": null}, "pi_utm_content_c": {"type": "integer", "index": 75, "name": "pi_utm_content_c", "comment": null}, "pi_utm_medium_c": {"type": "integer", "index": 76, "name": "pi_utm_medium_c", "comment": null}, "pi_utm_source_c": {"type": "integer", "index": 77, "name": "pi_utm_source_c", "comment": null}, "pi_utm_term_c": {"type": "integer", "index": 78, "name": "pi_utm_term_c", "comment": null}, "lead_source": {"type": "text", "index": 79, "name": "lead_source", "comment": null}, "contact_status_c": {"type": "text", "index": 80, "name": "contact_status_c", "comment": null}, "region_c": {"type": "integer", "index": 81, "name": "region_c", "comment": null}, "competitor_c": {"type": "integer", "index": 82, "name": "competitor_c", "comment": null}, "bt_stripe_gender_c": {"type": "integer", "index": 83, "name": "bt_stripe_gender_c", "comment": null}, "bt_stripe_ssn_last_4_encrypted_c": {"type": "integer", "index": 84, "name": "bt_stripe_ssn_last_4_encrypted_c", "comment": null}, "bt_stripe_personal_id_number_c": {"type": "integer", "index": 85, "name": "bt_stripe_personal_id_number_c", "comment": null}, "bt_stripe_personal_id_number_encrypted_c": {"type": "integer", "index": 86, "name": "bt_stripe_personal_id_number_encrypted_c", "comment": null}, "bt_stripe_maiden_name_c": {"type": "integer", "index": 87, "name": "bt_stripe_maiden_name_c", "comment": null}, "bt_stripe_languages_c": {"type": "integer", "index": 88, "name": "bt_stripe_languages_c", "comment": null}, "bt_stripe_default_payment_method_c": {"type": "integer", "index": 89, "name": "bt_stripe_default_payment_method_c", "comment": null}, "bt_stripe_ssn_last_4_c": {"type": "integer", "index": 90, "name": "bt_stripe_ssn_last_4_c", "comment": null}, "bt_stripe_personal_id_type_c": {"type": "integer", "index": 91, "name": "bt_stripe_personal_id_type_c", "comment": null}, "bt_stripe_default_payment_gateway_c": {"type": "integer", "index": 92, "name": "bt_stripe_default_payment_gateway_c", "comment": null}, "bt_stripe_level_c": {"type": "integer", "index": 93, "name": "bt_stripe_level_c", "comment": null}, "lean_data_routing_action_c": {"type": "text", "index": 94, "name": "lean_data_routing_action_c", "comment": null}, "lean_data_matched_buyer_persona_c": {"type": "integer", "index": 95, "name": "lean_data_matched_buyer_persona_c", "comment": null}, "lean_data_ld_segment_c": {"type": "integer", "index": 96, "name": "lean_data_ld_segment_c", "comment": null}, "lean_data_tag_c": {"type": "integer", "index": 97, "name": "lean_data_tag_c", "comment": null}, "lean_data_modified_score_c": {"type": "integer", "index": 98, "name": "lean_data_modified_score_c", "comment": null}, "do_not_route_lead_c": {"type": "boolean", "index": 99, "name": "do_not_route_lead_c", "comment": null}, "technical_contact_c": {"type": "integer", "index": 100, "name": "technical_contact_c", "comment": null}, "allbound_id_c": {"type": "integer", "index": 101, "name": "allbound_id_c", "comment": null}, "notes_c": {"type": "integer", "index": 102, "name": "notes_c", "comment": null}, "netsuite_conn_sync_in_progress_c": {"type": "boolean", "index": 103, "name": "netsuite_conn_sync_in_progress_c", "comment": null}, "netsuite_conn_celigo_update_c": {"type": "boolean", "index": 104, "name": "netsuite_conn_celigo_update_c", "comment": null}, "netsuite_conn_net_suite_id_c": {"type": "integer", "index": 105, "name": "netsuite_conn_net_suite_id_c", "comment": null}, "netsuite_conn_net_suite_sync_err_c": {"type": "integer", "index": 106, "name": "netsuite_conn_net_suite_sync_err_c", "comment": null}, "netsuite_conn_push_to_net_suite_c": {"type": "boolean", "index": 107, "name": "netsuite_conn_push_to_net_suite_c", "comment": null}, "netsuite_conn_pushed_from_opportunity_c": {"type": "boolean", "index": 108, "name": "netsuite_conn_pushed_from_opportunity_c", "comment": null}, "description": {"type": "text", "index": 109, "name": "description", "comment": null}, "lid_linked_in_company_id_c": {"type": "integer", "index": 110, "name": "lid_linked_in_company_id_c", "comment": null}, "lid_linked_in_member_token_c": {"type": "integer", "index": 111, "name": "lid_linked_in_member_token_c", "comment": null}, "is_eu_resident_c": {"type": "boolean", "index": 112, "name": "is_eu_resident_c", "comment": null}, "do_not_call": {"type": "boolean", "index": 113, "name": "do_not_call", "comment": null}, "sales_loft_1_most_recent_cadence_next_step_due_date_c": {"type": "integer", "index": 114, "name": "sales_loft_1_most_recent_cadence_next_step_due_date_c", "comment": null}, "sales_loft_1_most_recent_last_completed_step_c": {"type": "integer", "index": 115, "name": "sales_loft_1_most_recent_last_completed_step_c", "comment": null}, "sales_loft_1_most_recent_cadence_name_c": {"type": "integer", "index": 116, "name": "sales_loft_1_most_recent_cadence_name_c", "comment": null}, "source_detail_c": {"type": "text", "index": 117, "name": "source_detail_c", "comment": null}, "utm_source_c": {"type": "integer", "index": 118, "name": "utm_source_c", "comment": null}, "utm_content_c": {"type": "integer", "index": 119, "name": "utm_content_c", "comment": null}, "utm_term_c": {"type": "integer", "index": 120, "name": "utm_term_c", "comment": null}, "utm_medium_c": {"type": "integer", "index": 121, "name": "utm_medium_c", "comment": null}, "utm_campaign_c": {"type": "integer", "index": 122, "name": "utm_campaign_c", "comment": null}, "network_c": {"type": "integer", "index": 123, "name": "network_c", "comment": null}, "matchtype_c": {"type": "integer", "index": 124, "name": "matchtype_c", "comment": null}, "device_c": {"type": "integer", "index": 125, "name": "device_c", "comment": null}, "creative_c": {"type": "integer", "index": 126, "name": "creative_c", "comment": null}, "adgroupid_c": {"type": "integer", "index": 127, "name": "adgroupid_c", "comment": null}, "keyword_c": {"type": "integer", "index": 128, "name": "keyword_c", "comment": null}, "campaignid_c": {"type": "integer", "index": 129, "name": "campaignid_c", "comment": null}, "partner_rep_email_c": {"type": "integer", "index": 130, "name": "partner_rep_email_c", "comment": null}, "partner_rep_name_c": {"type": "integer", "index": 131, "name": "partner_rep_name_c", "comment": null}, "contact_type_c": {"type": "integer", "index": 132, "name": "contact_type_c", "comment": null}, "old_lead_source_c": {"type": "integer", "index": 133, "name": "old_lead_source_c", "comment": null}, "old_lead_source_detail_c": {"type": "integer", "index": 134, "name": "old_lead_source_detail_c", "comment": null}, "contact_stage_c": {"type": "integer", "index": 135, "name": "contact_stage_c", "comment": null}, "original_utm_campaign_c": {"type": "integer", "index": 136, "name": "original_utm_campaign_c", "comment": null}, "original_utm_content_c": {"type": "integer", "index": 137, "name": "original_utm_content_c", "comment": null}, "original_utm_medium_c": {"type": "integer", "index": 138, "name": "original_utm_medium_c", "comment": null}, "original_utm_source_c": {"type": "integer", "index": 139, "name": "original_utm_source_c", "comment": null}, "original_utm_term_c": {"type": "integer", "index": 140, "name": "original_utm_term_c", "comment": null}, "es_app_escreated_timestamp_c": {"type": "integer", "index": 141, "name": "es_app_escreated_timestamp_c", "comment": null}, "es_app_esecid_c": {"type": "integer", "index": 142, "name": "es_app_esecid_c", "comment": null}, "es_app_esenriched_c": {"type": "integer", "index": 143, "name": "es_app_esenriched_c", "comment": null}, "es_app_esenriched_timestamp_c": {"type": "integer", "index": 144, "name": "es_app_esenriched_timestamp_c", "comment": null}, "es_app_esintent_aggregate_score_c": {"type": "integer", "index": 145, "name": "es_app_esintent_aggregate_score_c", "comment": null}, "es_app_esintent_timestamp_c": {"type": "integer", "index": 146, "name": "es_app_esintent_timestamp_c", "comment": null}, "es_app_esintent_topics_c": {"type": "integer", "index": 147, "name": "es_app_esintent_topics_c", "comment": null}, "es_app_esoverall_fit_score_c": {"type": "integer", "index": 148, "name": "es_app_esoverall_fit_score_c", "comment": null}, "es_app_essource_c": {"type": "integer", "index": 149, "name": "es_app_essource_c", "comment": null}, "individual_id": {"type": "integer", "index": 150, "name": "individual_id", "comment": null}, "marketing_process_c": {"type": "integer", "index": 151, "name": "marketing_process_c", "comment": null}, "automation_tracking_c": {"type": "integer", "index": 152, "name": "automation_tracking_c", "comment": null}, "user_gems_has_changed_job_c": {"type": "integer", "index": 153, "name": "user_gems_has_changed_job_c", "comment": null}, "email_opt_in_explicit_c": {"type": "integer", "index": 154, "name": "email_opt_in_explicit_c", "comment": null}, "email_opt_in_implicit_c": {"type": "integer", "index": 155, "name": "email_opt_in_implicit_c", "comment": null}, "gdpr_opt_in_explicit_c": {"type": "integer", "index": 156, "name": "gdpr_opt_in_explicit_c", "comment": null}, "user_gems_is_a_user_gem_c": {"type": "integer", "index": 157, "name": "user_gems_is_a_user_gem_c", "comment": null}, "user_gems_past_account_c": {"type": "integer", "index": 158, "name": "user_gems_past_account_c", "comment": null}, "user_gems_past_company_c": {"type": "integer", "index": 159, "name": "user_gems_past_company_c", "comment": null}, "user_gems_past_contact_c": {"type": "integer", "index": 160, "name": "user_gems_past_contact_c", "comment": null}, "user_gems_past_title_c": {"type": "integer", "index": 161, "name": "user_gems_past_title_c", "comment": null}, "partner_contact_c": {"type": "integer", "index": 162, "name": "partner_contact_c", "comment": null}, "promotion_id_c": {"type": "integer", "index": 163, "name": "promotion_id_c", "comment": null}, "referral_exists_c": {"type": "integer", "index": 164, "name": "referral_exists_c", "comment": null}, "referral_first_name_c": {"type": "integer", "index": 165, "name": "referral_first_name_c", "comment": null}, "referral_last_name_c": {"type": "integer", "index": 166, "name": "referral_last_name_c", "comment": null}, "mkto_71_contact_acquisition_date_c": {"type": "integer", "index": 167, "name": "mkto_71_contact_acquisition_date_c", "comment": null}, "mkto_71_contact_acquisition_program_c": {"type": "integer", "index": 168, "name": "mkto_71_contact_acquisition_program_c", "comment": null}, "mkto_71_contact_acquisition_program_id_c": {"type": "integer", "index": 169, "name": "mkto_71_contact_acquisition_program_id_c", "comment": null}, "mkto_71_contact_inferred_city_c": {"type": "integer", "index": 170, "name": "mkto_71_contact_inferred_city_c", "comment": null}, "mkto_71_contact_inferred_company_c": {"type": "integer", "index": 171, "name": "mkto_71_contact_inferred_company_c", "comment": null}, "mkto_71_contact_inferred_country_c": {"type": "integer", "index": 172, "name": "mkto_71_contact_inferred_country_c", "comment": null}, "mkto_71_contact_inferred_metropolitan_a_c": {"type": "integer", "index": 173, "name": "mkto_71_contact_inferred_metropolitan_a_c", "comment": null}, "mkto_71_contact_inferred_phone_area_cod_c": {"type": "integer", "index": 174, "name": "mkto_71_contact_inferred_phone_area_cod_c", "comment": null}, "mkto_71_contact_inferred_postal_code_c": {"type": "integer", "index": 175, "name": "mkto_71_contact_inferred_postal_code_c", "comment": null}, "mkto_71_contact_inferred_state_region_c": {"type": "integer", "index": 176, "name": "mkto_71_contact_inferred_state_region_c", "comment": null}, "mkto_71_contact_lead_score_c": {"type": "integer", "index": 177, "name": "mkto_71_contact_lead_score_c", "comment": null}, "mkto_71_contact_original_referrer_c": {"type": "integer", "index": 178, "name": "mkto_71_contact_original_referrer_c", "comment": null}, "mkto_71_contact_original_search_engine_c": {"type": "integer", "index": 179, "name": "mkto_71_contact_original_search_engine_c", "comment": null}, "mkto_71_contact_original_search_phrase_c": {"type": "integer", "index": 180, "name": "mkto_71_contact_original_search_phrase_c", "comment": null}, "mkto_71_contact_original_source_info_c": {"type": "integer", "index": 181, "name": "mkto_71_contact_original_source_info_c", "comment": null}, "mkto_71_contact_original_source_type_c": {"type": "integer", "index": 182, "name": "mkto_71_contact_original_source_type_c", "comment": null}, "mkto_si_hide_date_c": {"type": "integer", "index": 183, "name": "mkto_si_hide_date_c", "comment": null}, "mkto_si_last_interesting_moment_date_c": {"type": "integer", "index": 184, "name": "mkto_si_last_interesting_moment_date_c", "comment": null}, "mkto_si_last_interesting_moment_desc_c": {"type": "integer", "index": 185, "name": "mkto_si_last_interesting_moment_desc_c", "comment": null}, "mkto_si_last_interesting_moment_source_c": {"type": "integer", "index": 186, "name": "mkto_si_last_interesting_moment_source_c", "comment": null}, "mkto_si_last_interesting_moment_type_c": {"type": "integer", "index": 187, "name": "mkto_si_last_interesting_moment_type_c", "comment": null}, "mkto_si_mkto_lead_score_c": {"type": "integer", "index": 188, "name": "mkto_si_mkto_lead_score_c", "comment": null}, "mkto_si_priority_c": {"type": "integer", "index": 189, "name": "mkto_si_priority_c", "comment": null}, "mkto_si_relative_score_value_c": {"type": "integer", "index": 190, "name": "mkto_si_relative_score_value_c", "comment": null}, "mkto_si_urgency_value_c": {"type": "integer", "index": 191, "name": "mkto_si_urgency_value_c", "comment": null}, "cloudingo_agent_ces_c": {"type": "integer", "index": 192, "name": "cloudingo_agent_ces_c", "comment": null}, "cloudingo_agent_mar_c": {"type": "integer", "index": 193, "name": "cloudingo_agent_mar_c", "comment": null}, "cloudingo_agent_mas_c": {"type": "integer", "index": 194, "name": "cloudingo_agent_mas_c", "comment": null}, "cloudingo_agent_mav_c": {"type": "integer", "index": 195, "name": "cloudingo_agent_mav_c", "comment": null}, "cloudingo_agent_mrdi_c": {"type": "integer", "index": 196, "name": "cloudingo_agent_mrdi_c", "comment": null}, "cloudingo_agent_mtz_c": {"type": "integer", "index": 197, "name": "cloudingo_agent_mtz_c", "comment": null}, "cloudingo_agent_oar_c": {"type": "integer", "index": 198, "name": "cloudingo_agent_oar_c", "comment": null}, "cloudingo_agent_oas_c": {"type": "integer", "index": 199, "name": "cloudingo_agent_oas_c", "comment": null}, "cloudingo_agent_oav_c": {"type": "integer", "index": 200, "name": "cloudingo_agent_oav_c", "comment": null}, "cloudingo_agent_ordi_c": {"type": "integer", "index": 201, "name": "cloudingo_agent_ordi_c", "comment": null}, "cloudingo_agent_otz_c": {"type": "integer", "index": 202, "name": "cloudingo_agent_otz_c", "comment": null}, "do_not_sync_marketo_c": {"type": "integer", "index": 203, "name": "do_not_sync_marketo_c", "comment": null}, "phone_extension_c": {"type": "integer", "index": 204, "name": "phone_extension_c", "comment": null}, "job_function_c": {"type": "integer", "index": 205, "name": "job_function_c", "comment": null}, "job_level_c": {"type": "integer", "index": 206, "name": "job_level_c", "comment": null}, "direct_office_c": {"type": "integer", "index": 207, "name": "direct_office_c", "comment": null}, "city_c": {"type": "integer", "index": 208, "name": "city_c", "comment": null}, "country_c": {"type": "integer", "index": 209, "name": "country_c", "comment": null}, "state_c": {"type": "integer", "index": 210, "name": "state_c", "comment": null}, "secondary_email_c": {"type": "integer", "index": 211, "name": "secondary_email_c", "comment": null}, "es_seniority_c": {"type": "integer", "index": 212, "name": "es_seniority_c", "comment": null}, "source_last_lead_source_c": {"type": "integer", "index": 213, "name": "source_last_lead_source_c", "comment": null}, "source_last_lead_source_category_c": {"type": "integer", "index": 214, "name": "source_last_lead_source_category_c", "comment": null}, "source_last_lead_source_detail_c": {"type": "integer", "index": 215, "name": "source_last_lead_source_detail_c", "comment": null}, "drift_cql_c": {"type": "integer", "index": 216, "name": "drift_cql_c", "comment": null}, "hot_contact_c": {"type": "integer", "index": 217, "name": "hot_contact_c", "comment": null}, "behavioral_score_c": {"type": "integer", "index": 218, "name": "behavioral_score_c", "comment": null}, "unique_email_c": {"type": "integer", "index": 219, "name": "unique_email_c", "comment": null}, "is_emea_event_routing_c": {"type": "integer", "index": 220, "name": "is_emea_event_routing_c", "comment": null}, "csi_code_c": {"type": "integer", "index": 221, "name": "csi_code_c", "comment": null}, "clearbit_role_c": {"type": "integer", "index": 222, "name": "clearbit_role_c", "comment": null}, "clearbit_seniority_c": {"type": "integer", "index": 223, "name": "clearbit_seniority_c", "comment": null}, "clearbit_sub_role_c": {"type": "integer", "index": 224, "name": "clearbit_sub_role_c", "comment": null}, "rh_2_currency_test_c": {"type": "integer", "index": 225, "name": "rh_2_currency_test_c", "comment": null}, "rh_2_describe_c": {"type": "integer", "index": 226, "name": "rh_2_describe_c", "comment": null}, "rh_2_integer_test_c": {"type": "integer", "index": 227, "name": "rh_2_integer_test_c", "comment": null}, "created_by_role_c": {"type": "integer", "index": 228, "name": "created_by_role_c", "comment": null}, "demographic_score_c": {"type": "integer", "index": 229, "name": "demographic_score_c", "comment": null}, "country_code_c": {"type": "integer", "index": 230, "name": "country_code_c", "comment": null}, "state_code_c": {"type": "integer", "index": 231, "name": "state_code_c", "comment": null}, "attended_event_c": {"type": "integer", "index": 232, "name": "attended_event_c", "comment": null}, "zoominfo_technologies_c": {"type": "integer", "index": 233, "name": "zoominfo_technologies_c", "comment": null}, "mql_date_c": {"type": "integer", "index": 234, "name": "mql_date_c", "comment": null}, "user_gems_user_gems_id_c": {"type": "integer", "index": 235, "name": "user_gems_user_gems_id_c", "comment": null}, "dozisf_zoom_info_company_id_c": {"type": "integer", "index": 236, "name": "dozisf_zoom_info_company_id_c", "comment": null}, "dozisf_zoom_info_first_updated_c": {"type": "integer", "index": 237, "name": "dozisf_zoom_info_first_updated_c", "comment": null}, "dozisf_zoom_info_id_c": {"type": "integer", "index": 238, "name": "dozisf_zoom_info_id_c", "comment": null}, "dozisf_zoom_info_last_updated_c": {"type": "integer", "index": 239, "name": "dozisf_zoom_info_last_updated_c", "comment": null}, "lean_data_manual_route_trigger_c": {"type": "integer", "index": 240, "name": "lean_data_manual_route_trigger_c", "comment": null}, "first_mql_date_c": {"type": "integer", "index": 241, "name": "first_mql_date_c", "comment": null}, "active_relationship_c": {"type": "integer", "index": 242, "name": "active_relationship_c", "comment": null}, "clarus_date_c": {"type": "integer", "index": 243, "name": "clarus_date_c", "comment": null}, "clarus_editor_c": {"type": "integer", "index": 244, "name": "clarus_editor_c", "comment": null}, "clarus_notes_c": {"type": "integer", "index": 245, "name": "clarus_notes_c", "comment": null}, "clarus_project_c": {"type": "integer", "index": 246, "name": "clarus_project_c", "comment": null}, "clarus_status_c": {"type": "integer", "index": 247, "name": "clarus_status_c", "comment": null}, "historical_contact_status_c": {"type": "integer", "index": 248, "name": "historical_contact_status_c", "comment": null}, "fivetran_account_association_date_c": {"type": "integer", "index": 249, "name": "fivetran_account_association_date_c", "comment": null}, "fivetran_account_user_role_s_c": {"type": "integer", "index": 250, "name": "fivetran_account_user_role_s_c", "comment": null}, "mql_reason_c": {"type": "integer", "index": 251, "name": "mql_reason_c", "comment": null}, "attempting_contact_date_time_c": {"type": "integer", "index": 252, "name": "attempting_contact_date_time_c", "comment": null}, "linked_in_url_c": {"type": "integer", "index": 253, "name": "linked_in_url_c", "comment": null}, "trial_contact_start_date_c": {"type": "integer", "index": 254, "name": "trial_contact_start_date_c", "comment": null}, "contact_holdover_c": {"type": "integer", "index": 255, "name": "contact_holdover_c", "comment": null}, "bill_to_contact_hidden_c": {"type": "integer", "index": 256, "name": "bill_to_contact_hidden_c", "comment": null}, "enrichment_request_c": {"type": "integer", "index": 257, "name": "enrichment_request_c", "comment": null}, "meta_data_create_date_c": {"type": "integer", "index": 258, "name": "meta_data_create_date_c", "comment": null}, "primary_se_c": {"type": "integer", "index": 259, "name": "primary_se_c", "comment": null}, "unqualified_reason_c": {"type": "integer", "index": 260, "name": "unqualified_reason_c", "comment": null}, "opp_handoff_ae_c": {"type": "integer", "index": 261, "name": "opp_handoff_ae_c", "comment": null}, "marketing_connector_interest_c": {"type": "integer", "index": 262, "name": "marketing_connector_interest_c", "comment": null}, "recent_marketing_campaign_status_c": {"type": "integer", "index": 263, "name": "recent_marketing_campaign_status_c", "comment": null}, "salesloft_cadence_trigger_c": {"type": "integer", "index": 264, "name": "salesloft_cadence_trigger_c", "comment": null}, "last_ae_activity_owner_c": {"type": "integer", "index": 265, "name": "last_ae_activity_owner_c", "comment": null}, "last_bdr_activity_owner_c": {"type": "integer", "index": 266, "name": "last_bdr_activity_owner_c", "comment": null}, "last_manual_ae_activity_date_c": {"type": "integer", "index": 267, "name": "last_manual_ae_activity_date_c", "comment": null}, "last_manual_bdr_activity_date_c": {"type": "integer", "index": 268, "name": "last_manual_bdr_activity_date_c", "comment": null}, "leandata_contact_owner_override_c": {"type": "integer", "index": 269, "name": "leandata_contact_owner_override_c", "comment": null}, "potential_fivetran_use_case_c": {"type": "integer", "index": 270, "name": "potential_fivetran_use_case_c", "comment": null}, "lean_data_router_completion_date_time_c": {"type": "integer", "index": 271, "name": "lean_data_router_completion_date_time_c", "comment": null}, "partner_territory_c": {"type": "integer", "index": 272, "name": "partner_territory_c", "comment": null}, "partner_company_c": {"type": "integer", "index": 273, "name": "partner_company_c", "comment": null}, "bizible_2_ad_campaign_name_ft_c": {"type": "integer", "index": 274, "name": "bizible_2_ad_campaign_name_ft_c", "comment": null}, "bizible_2_ad_campaign_name_lc_c": {"type": "integer", "index": 275, "name": "bizible_2_ad_campaign_name_lc_c", "comment": null}, "bizible_2_bizible_id_c": {"type": "integer", "index": 276, "name": "bizible_2_bizible_id_c", "comment": null}, "bizible_2_landing_page_ft_c": {"type": "integer", "index": 277, "name": "bizible_2_landing_page_ft_c", "comment": null}, "bizible_2_landing_page_lc_c": {"type": "integer", "index": 278, "name": "bizible_2_landing_page_lc_c", "comment": null}, "bizible_2_marketing_channel_ft_c": {"type": "integer", "index": 279, "name": "bizible_2_marketing_channel_ft_c", "comment": null}, "bizible_2_marketing_channel_lc_c": {"type": "integer", "index": 280, "name": "bizible_2_marketing_channel_lc_c", "comment": null}, "bizible_2_touchpoint_date_ft_c": {"type": "integer", "index": 281, "name": "bizible_2_touchpoint_date_ft_c", "comment": null}, "bizible_2_touchpoint_date_lc_c": {"type": "integer", "index": 282, "name": "bizible_2_touchpoint_date_lc_c", "comment": null}, "bizible_2_touchpoint_source_ft_c": {"type": "integer", "index": 283, "name": "bizible_2_touchpoint_source_ft_c", "comment": null}, "bizible_2_touchpoint_source_lc_c": {"type": "integer", "index": 284, "name": "bizible_2_touchpoint_source_lc_c", "comment": null}, "sales_email_opt_out_c": {"type": "integer", "index": 285, "name": "sales_email_opt_out_c", "comment": null}, "sales_email_opt_out_date_time_c": {"type": "integer", "index": 286, "name": "sales_email_opt_out_date_time_c", "comment": null}, "celigo_sfnsio_net_suite_id_c": {"type": "integer", "index": 287, "name": "celigo_sfnsio_net_suite_id_c", "comment": null}, "celigo_sfnsio_net_suite_record_c": {"type": "integer", "index": 288, "name": "celigo_sfnsio_net_suite_record_c", "comment": null}, "celigo_sfnsio_net_suite_sync_error_c": {"type": "integer", "index": 289, "name": "celigo_sfnsio_net_suite_sync_error_c", "comment": null}, "celigo_sfnsio_skip_export_to_net_suite_c": {"type": "integer", "index": 290, "name": "celigo_sfnsio_skip_export_to_net_suite_c", "comment": null}, "celigo_sfnsio_test_mode_record_c": {"type": "integer", "index": 291, "name": "celigo_sfnsio_test_mode_record_c", "comment": null}, "ironclad_workflow_c": {"type": "integer", "index": 292, "name": "ironclad_workflow_c", "comment": null}, "last_sales_activity_date_time_c": {"type": "integer", "index": 293, "name": "last_sales_activity_date_time_c", "comment": null}, "user_activity_logged_by_c": {"type": "integer", "index": 294, "name": "user_activity_logged_by_c", "comment": null}, "first_activity_after_mql_date_c": {"type": "integer", "index": 295, "name": "first_activity_after_mql_date_c", "comment": null}, "last_sdr_activity_owner_c": {"type": "integer", "index": 296, "name": "last_sdr_activity_owner_c", "comment": null}, "last_sdr_activity_date_c": {"type": "integer", "index": 297, "name": "last_sdr_activity_date_c", "comment": null}, "beta_connector_interest_c": {"type": "integer", "index": 298, "name": "beta_connector_interest_c", "comment": null}, "first_manual_activity_after_mql_date_c": {"type": "integer", "index": 299, "name": "first_manual_activity_after_mql_date_c", "comment": null}, "user_gems_ug_past_infos_c": {"type": "integer", "index": 300, "name": "user_gems_ug_past_infos_c", "comment": null}, "user_gems_ug_current_infos_c": {"type": "integer", "index": 301, "name": "user_gems_ug_current_infos_c", "comment": null}, "user_gems_ug_created_by_ug_c": {"type": "integer", "index": 302, "name": "user_gems_ug_created_by_ug_c", "comment": null}, "free_trial_email_confirmed_date_c": {"type": "integer", "index": 303, "name": "free_trial_email_confirmed_date_c", "comment": null}, "routed_from_manual_bdr_ae_activity_c": {"type": "integer", "index": 304, "name": "routed_from_manual_bdr_ae_activity_c", "comment": null}, "dnboptimizer_dn_bcontact_record_c": {"type": "integer", "index": 305, "name": "dnboptimizer_dn_bcontact_record_c", "comment": null}, "i_sell_avention_id_c": {"type": "integer", "index": 306, "name": "i_sell_avention_id_c", "comment": null}, "persona_c": {"type": "integer", "index": 307, "name": "persona_c", "comment": null}, "last_marketing_interesting_moment_date_c": {"type": "integer", "index": 308, "name": "last_marketing_interesting_moment_date_c", "comment": null}, "verified_c": {"type": "integer", "index": 309, "name": "verified_c", "comment": null}, "salesloft_owner_c": {"type": "integer", "index": 310, "name": "salesloft_owner_c", "comment": null}, "salesloft_owner_sf_c": {"type": "integer", "index": 311, "name": "salesloft_owner_sf_c", "comment": null}, "email_opt_out_date_time_c": {"type": "integer", "index": 312, "name": "email_opt_out_date_time_c", "comment": null}, "pbf_startup_primary_role_c": {"type": "integer", "index": 313, "name": "pbf_startup_primary_role_c", "comment": null}, "pbf_startup_certify_eligibility_c": {"type": "integer", "index": 314, "name": "pbf_startup_certify_eligibility_c", "comment": null}, "engagio_intent_minutes_last_30_days_c": {"type": "integer", "index": 315, "name": "engagio_intent_minutes_last_30_days_c", "comment": null}, "engagio_engagement_minutes_last_3_months_c": {"type": "integer", "index": 316, "name": "engagio_engagement_minutes_last_3_months_c", "comment": null}, "engagio_engagement_minutes_last_7_days_c": {"type": "integer", "index": 317, "name": "engagio_engagement_minutes_last_7_days_c", "comment": null}, "engagio_first_engagement_date_c": {"type": "integer", "index": 318, "name": "engagio_first_engagement_date_c", "comment": null}, "engagio_department_c": {"type": "integer", "index": 319, "name": "engagio_department_c", "comment": null}, "engagio_role_c": {"type": "integer", "index": 320, "name": "engagio_role_c", "comment": null}, "mql_date_changed_c": {"type": "integer", "index": 321, "name": "mql_date_changed_c", "comment": null}, "first_activity_after_mql_changed_c": {"type": "integer", "index": 322, "name": "first_activity_after_mql_changed_c", "comment": null}, "birthdate": {"type": "timestamp without time zone", "index": 323, "name": "birthdate", "comment": null}, "legacy_hvr_id_c": {"type": "integer", "index": 324, "name": "legacy_hvr_id_c", "comment": null}, "has_opted_out_of_fax": {"type": "integer", "index": 325, "name": "has_opted_out_of_fax", "comment": null}, "other_latitude": {"type": "integer", "index": 326, "name": "other_latitude", "comment": null}, "username_c": {"type": "integer", "index": 327, "name": "username_c", "comment": null}, "assistant_name": {"type": "integer", "index": 328, "name": "assistant_name", "comment": null}, "created_at_c": {"type": "integer", "index": 329, "name": "created_at_c", "comment": null}, "partner_contact_deprecate_c": {"type": "integer", "index": 330, "name": "partner_contact_deprecate_c", "comment": null}, "other_street": {"type": "integer", "index": 331, "name": "other_street", "comment": null}, "other_state": {"type": "integer", "index": 332, "name": "other_state", "comment": null}, "home_phone": {"type": "integer", "index": 333, "name": "home_phone", "comment": null}, "other_city": {"type": "integer", "index": 334, "name": "other_city", "comment": null}, "company_c": {"type": "integer", "index": 335, "name": "company_c", "comment": null}, "opportunity_c": {"type": "integer", "index": 336, "name": "opportunity_c", "comment": null}, "hvr_update_c": {"type": "integer", "index": 337, "name": "hvr_update_c", "comment": null}, "other_phone": {"type": "integer", "index": 338, "name": "other_phone", "comment": null}, "other_geocode_accuracy": {"type": "integer", "index": 339, "name": "other_geocode_accuracy", "comment": null}, "other_postal_code": {"type": "integer", "index": 340, "name": "other_postal_code", "comment": null}, "other_country": {"type": "integer", "index": 341, "name": "other_country", "comment": null}, "assistant_phone": {"type": "integer", "index": 342, "name": "assistant_phone", "comment": null}, "jigsaw": {"type": "integer", "index": 343, "name": "jigsaw", "comment": null}, "avatar_c": {"type": "integer", "index": 344, "name": "avatar_c", "comment": null}, "other_longitude": {"type": "integer", "index": 345, "name": "other_longitude", "comment": null}, "lean_data_status_info_c": {"type": "integer", "index": 346, "name": "lean_data_status_info_c", "comment": null}, "analytics_id_c": {"type": "integer", "index": 347, "name": "analytics_id_c", "comment": null}, "dnb_primary_address_postal_code_c": {"type": "integer", "index": 348, "name": "dnb_primary_address_postal_code_c", "comment": null}, "dnb_contact_phone_c": {"type": "integer", "index": 349, "name": "dnb_contact_phone_c", "comment": null}, "dnb_email_deliverability_score_c": {"type": "integer", "index": 350, "name": "dnb_email_deliverability_score_c", "comment": null}, "dnb_job_title_c": {"type": "integer", "index": 351, "name": "dnb_job_title_c", "comment": null}, "dnb_email_c": {"type": "integer", "index": 352, "name": "dnb_email_c", "comment": null}, "dnb_primary_address_city_c": {"type": "integer", "index": 353, "name": "dnb_primary_address_city_c", "comment": null}, "dnb_phone_accuracy_score_c": {"type": "integer", "index": 354, "name": "dnb_phone_accuracy_score_c", "comment": null}, "dnb_primary_address_state_province_c": {"type": "integer", "index": 355, "name": "dnb_primary_address_state_province_c", "comment": null}, "dnb_primary_address_state_province_abbre_c": {"type": "integer", "index": 356, "name": "dnb_primary_address_state_province_abbre_c", "comment": null}, "dnb_primary_address_country_region_code_c": {"type": "integer", "index": 357, "name": "dnb_primary_address_country_region_code_c", "comment": null}, "email_opt_in_double_c": {"type": "integer", "index": 358, "name": "email_opt_in_double_c", "comment": null}, "phone_number_catch_all_c": {"type": "integer", "index": 359, "name": "phone_number_catch_all_c", "comment": null}, "contact_owners_manager_stamped_c": {"type": "integer", "index": 360, "name": "contact_owners_manager_stamped_c", "comment": null}, "fivetran_account_id_c": {"type": "integer", "index": 361, "name": "fivetran_account_id_c", "comment": null}, "contacts_domain_exists_c": {"type": "integer", "index": 362, "name": "contacts_domain_exists_c", "comment": null}, "utm_id_c": {"type": "integer", "index": 363, "name": "utm_id_c", "comment": null}, "self_service_routing_c": {"type": "integer", "index": 364, "name": "self_service_routing_c", "comment": null}, "no_geo_data_c": {"type": "integer", "index": 365, "name": "no_geo_data_c", "comment": null}, "to_be_deleted_salesloft_backfill_c": {"type": "integer", "index": 366, "name": "to_be_deleted_salesloft_backfill_c", "comment": null}, "do_not_sync_reason_marketo_c": {"type": "integer", "index": 367, "name": "do_not_sync_reason_marketo_c", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 368, "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.salesforce_source_integration_tests.sf_contact_data"}, "seed.salesforce_source_integration_tests.sf_contact_history_data": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_contact_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_active": {"type": "boolean", "index": 1, "name": "_fivetran_active", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_end", "comment": null}, "id": {"type": "text", "index": 4, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 5, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 6, "name": "account_id", "comment": null}, "email": {"type": "text", "index": 7, "name": "email", "comment": null}, "first_name": {"type": "text", "index": 8, "name": "first_name", "comment": null}, "is_deleted": {"type": "boolean", "index": 9, "name": "is_deleted", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 10, "name": "last_activity_date", "comment": null}, "last_modified_by_id": {"type": "text", "index": 11, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 12, "name": "last_modified_date", "comment": null}, "last_name": {"type": "text", "index": 13, "name": "last_name", "comment": null}, "last_referenced_date": {"type": "integer", "index": 14, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 15, "name": "last_viewed_date", "comment": null}, "mailing_city": {"type": "text", "index": 16, "name": "mailing_city", "comment": null}, "mailing_country": {"type": "text", "index": 17, "name": "mailing_country", "comment": null}, "mailing_country_code": {"type": "text", "index": 18, "name": "mailing_country_code", "comment": null}, "mailing_postal_code": {"type": "integer", "index": 19, "name": "mailing_postal_code", "comment": null}, "mailing_state": {"type": "text", "index": 20, "name": "mailing_state", "comment": null}, "mailing_street": {"type": "text", "index": 21, "name": "mailing_street", "comment": null}, "master_record_id": {"type": "integer", "index": 22, "name": "master_record_id", "comment": null}, "mobile_phone": {"type": "integer", "index": 23, "name": "mobile_phone", "comment": null}, "name": {"type": "text", "index": 24, "name": "name", "comment": null}, "owner_id": {"type": "text", "index": 25, "name": "owner_id", "comment": null}, "phone": {"type": "text", "index": 26, "name": "phone", "comment": null}, "reports_to_id": {"type": "integer", "index": 27, "name": "reports_to_id", "comment": null}, "title": {"type": "text", "index": 28, "name": "title", "comment": null}, "lead_source": {"type": "text", "index": 29, "name": "lead_source", "comment": null}, "description": {"type": "text", "index": 30, "name": "description", "comment": null}, "individual_id": {"type": "integer", "index": 31, "name": "individual_id", "comment": null}, "home_phone": {"type": "integer", "index": 32, "name": "home_phone", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.salesforce_source_integration_tests.sf_contact_history_data"}, "seed.salesforce_source_integration_tests.sf_event_data": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_event_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "activity_date": {"type": "timestamp without time zone", "index": 4, "name": "activity_date", "comment": null}, "activity_date_time": {"type": "timestamp without time zone", "index": 5, "name": "activity_date_time", "comment": null}, "created_by_id": {"type": "text", "index": 6, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 7, "name": "created_date", "comment": null}, "description": {"type": "text", "index": 8, "name": "description", "comment": null}, "duration_in_minutes": {"type": "integer", "index": 9, "name": "duration_in_minutes", "comment": null}, "end_date_time": {"type": "timestamp without time zone", "index": 10, "name": "end_date_time", "comment": null}, "event_subtype": {"type": "text", "index": 11, "name": "event_subtype", "comment": null}, "group_event_type": {"type": "integer", "index": 12, "name": "group_event_type", "comment": null}, "invitee_uuid_c": {"type": "integer", "index": 13, "name": "invitee_uuid_c", "comment": null}, "is_child": {"type": "boolean", "index": 14, "name": "is_child", "comment": null}, "is_deleted": {"type": "boolean", "index": 15, "name": "is_deleted", "comment": null}, "is_group_event": {"type": "boolean", "index": 16, "name": "is_group_event", "comment": null}, "is_private": {"type": "boolean", "index": 17, "name": "is_private", "comment": null}, "is_recurrence": {"type": "boolean", "index": 18, "name": "is_recurrence", "comment": null}, "is_reminder_set": {"type": "boolean", "index": 19, "name": "is_reminder_set", "comment": null}, "last_modified_by_id": {"type": "text", "index": 20, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 21, "name": "last_modified_date", "comment": null}, "location": {"type": "integer", "index": 22, "name": "location", "comment": null}, "no_show_c": {"type": "boolean", "index": 23, "name": "no_show_c", "comment": null}, "owner_id": {"type": "text", "index": 24, "name": "owner_id", "comment": null}, "recurrence_activity_id": {"type": "integer", "index": 25, "name": "recurrence_activity_id", "comment": null}, "recurrence_day_of_month": {"type": "integer", "index": 26, "name": "recurrence_day_of_month", "comment": null}, "recurrence_day_of_week_mask": {"type": "integer", "index": 27, "name": "recurrence_day_of_week_mask", "comment": null}, "recurrence_end_date_only": {"type": "timestamp without time zone", "index": 28, "name": "recurrence_end_date_only", "comment": null}, "recurrence_instance": {"type": "integer", "index": 29, "name": "recurrence_instance", "comment": null}, "recurrence_interval": {"type": "integer", "index": 30, "name": "recurrence_interval", "comment": null}, "recurrence_month_of_year": {"type": "integer", "index": 31, "name": "recurrence_month_of_year", "comment": null}, "recurrence_start_date_time": {"type": "timestamp without time zone", "index": 32, "name": "recurrence_start_date_time", "comment": null}, "recurrence_time_zone_sid_key": {"type": "integer", "index": 33, "name": "recurrence_time_zone_sid_key", "comment": null}, "recurrence_type": {"type": "integer", "index": 34, "name": "recurrence_type", "comment": null}, "referral_account_c": {"type": "integer", "index": 35, "name": "referral_account_c", "comment": null}, "referral_contact_c": {"type": "integer", "index": 36, "name": "referral_contact_c", "comment": null}, "reminder_date_time": {"type": "timestamp without time zone", "index": 37, "name": "reminder_date_time", "comment": null}, "show_as": {"type": "text", "index": 38, "name": "show_as", "comment": null}, "start_date_time": {"type": "timestamp without time zone", "index": 39, "name": "start_date_time", "comment": null}, "subject": {"type": "text", "index": 40, "name": "subject", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 41, "name": "system_modstamp", "comment": null}, "type": {"type": "text", "index": 42, "name": "type", "comment": null}, "what_count": {"type": "integer", "index": 43, "name": "what_count", "comment": null}, "what_id": {"type": "text", "index": 44, "name": "what_id", "comment": null}, "who_count": {"type": "integer", "index": 45, "name": "who_count", "comment": null}, "who_id": {"type": "text", "index": 46, "name": "who_id", "comment": null}, "first_meeting_held_c": {"type": "integer", "index": 47, "name": "first_meeting_held_c", "comment": null}, "associated_sdr_c": {"type": "integer", "index": 48, "name": "associated_sdr_c", "comment": null}, "first_meeting_c": {"type": "integer", "index": 49, "name": "first_meeting_c", "comment": null}, "call_recording_c": {"type": "integer", "index": 50, "name": "call_recording_c", "comment": null}, "affectlayer_chorus_call_id_c": {"type": "integer", "index": 51, "name": "affectlayer_chorus_call_id_c", "comment": null}, "affectlayer_affect_layer_call_id_c": {"type": "integer", "index": 52, "name": "affectlayer_affect_layer_call_id_c", "comment": null}, "last_rep_activity_date_c": {"type": "integer", "index": 53, "name": "last_rep_activity_date_c", "comment": null}, "lid_url_c": {"type": "integer", "index": 54, "name": "lid_url_c", "comment": null}, "lid_date_sent_c": {"type": "integer", "index": 55, "name": "lid_date_sent_c", "comment": null}, "sales_loft_step_id_c": {"type": "integer", "index": 56, "name": "sales_loft_step_id_c", "comment": null}, "sales_loft_step_name_c": {"type": "integer", "index": 57, "name": "sales_loft_step_name_c", "comment": null}, "sales_loft_step_type_c": {"type": "integer", "index": 58, "name": "sales_loft_step_type_c", "comment": null}, "sales_loft_email_template_id_c": {"type": "integer", "index": 59, "name": "sales_loft_email_template_id_c", "comment": null}, "sales_loft_external_identifier_c": {"type": "integer", "index": 60, "name": "sales_loft_external_identifier_c", "comment": null}, "sales_loft_cadence_id_c": {"type": "integer", "index": 61, "name": "sales_loft_cadence_id_c", "comment": null}, "sales_loft_clicked_count_c": {"type": "integer", "index": 62, "name": "sales_loft_clicked_count_c", "comment": null}, "sales_loft_cadence_name_c": {"type": "integer", "index": 63, "name": "sales_loft_cadence_name_c", "comment": null}, "sales_loft_reply_count_c": {"type": "integer", "index": 64, "name": "sales_loft_reply_count_c", "comment": null}, "call_disposition_c": {"type": "integer", "index": 65, "name": "call_disposition_c", "comment": null}, "sales_loft_email_template_title_c": {"type": "integer", "index": 66, "name": "sales_loft_email_template_title_c", "comment": null}, "sales_loft_step_day_new_c": {"type": "integer", "index": 67, "name": "sales_loft_step_day_new_c", "comment": null}, "call_disposition_2_c": {"type": "integer", "index": 68, "name": "call_disposition_2_c", "comment": null}, "sales_loft_viewed_count_c": {"type": "integer", "index": 69, "name": "sales_loft_viewed_count_c", "comment": null}, "sales_loft_1_sales_loft_step_day_c": {"type": "integer", "index": 70, "name": "sales_loft_1_sales_loft_step_day_c", "comment": null}, "sales_loft_1_sales_loft_clicked_count_c": {"type": "integer", "index": 71, "name": "sales_loft_1_sales_loft_clicked_count_c", "comment": null}, "sales_loft_1_sales_loft_view_count_c": {"type": "integer", "index": 72, "name": "sales_loft_1_sales_loft_view_count_c", "comment": null}, "sales_loft_1_call_disposition_c": {"type": "integer", "index": 73, "name": "sales_loft_1_call_disposition_c", "comment": null}, "sales_loft_1_sales_loft_replies_count_c": {"type": "integer", "index": 74, "name": "sales_loft_1_sales_loft_replies_count_c", "comment": null}, "sales_loft_1_sales_loft_cadence_name_c": {"type": "integer", "index": 75, "name": "sales_loft_1_sales_loft_cadence_name_c", "comment": null}, "sales_loft_1_call_sentiment_c": {"type": "integer", "index": 76, "name": "sales_loft_1_call_sentiment_c", "comment": null}, "sales_loft_1_sales_loft_email_template_title_c": {"type": "integer", "index": 77, "name": "sales_loft_1_sales_loft_email_template_title_c", "comment": null}, "is_recurrence_2": {"type": "boolean", "index": 78, "name": "is_recurrence_2", "comment": null}, "is_recurrence_2_exception": {"type": "boolean", "index": 79, "name": "is_recurrence_2_exception", "comment": null}, "is_recurrence_2_exclusion": {"type": "boolean", "index": 80, "name": "is_recurrence_2_exclusion", "comment": null}, "recurrence_2_pattern_start_date": {"type": "timestamp without time zone", "index": 81, "name": "recurrence_2_pattern_start_date", "comment": null}, "recurrence_2_pattern_text": {"type": "integer", "index": 82, "name": "recurrence_2_pattern_text", "comment": null}, "recurrence_2_pattern_time_zone": {"type": "integer", "index": 83, "name": "recurrence_2_pattern_time_zone", "comment": null}, "recurrence_2_pattern_version": {"type": "integer", "index": 84, "name": "recurrence_2_pattern_version", "comment": null}, "co_selling_activity_c": {"type": "integer", "index": 85, "name": "co_selling_activity_c", "comment": null}, "is_a_co_sell_activity_c": {"type": "integer", "index": 86, "name": "is_a_co_sell_activity_c", "comment": null}, "partner_contact_c": {"type": "integer", "index": 87, "name": "partner_contact_c", "comment": null}, "description_c": {"type": "integer", "index": 88, "name": "description_c", "comment": null}, "campaign_c": {"type": "integer", "index": 89, "name": "campaign_c", "comment": null}, "event_name_c": {"type": "integer", "index": 90, "name": "event_name_c", "comment": null}, "partner_account_c": {"type": "integer", "index": 91, "name": "partner_account_c", "comment": null}, "topic_c": {"type": "integer", "index": 92, "name": "topic_c", "comment": null}, "attendance_number_c": {"type": "integer", "index": 93, "name": "attendance_number_c", "comment": null}, "partner_activity_type_c": {"type": "integer", "index": 94, "name": "partner_activity_type_c", "comment": null}, "how_did_you_bring_value_or_create_trust_c": {"type": "integer", "index": 95, "name": "how_did_you_bring_value_or_create_trust_c", "comment": null}, "proof_of_referral_c": {"type": "integer", "index": 96, "name": "proof_of_referral_c", "comment": null}, "how_did_you_bring_value_or_earn_trust_c": {"type": "integer", "index": 97, "name": "how_did_you_bring_value_or_earn_trust_c", "comment": null}, "duration_in_minutes_c": {"type": "integer", "index": 98, "name": "duration_in_minutes_c", "comment": null}, "vidyard_c": {"type": "boolean", "index": 99, "name": "vidyard_c", "comment": null}, "collections_hold_c": {"type": "boolean", "index": 100, "name": "collections_hold_c", "comment": null}, "execute_collections_plan_activity_c": {"type": "boolean", "index": 101, "name": "execute_collections_plan_activity_c", "comment": null}, "expected_payment_date_c": {"type": "integer", "index": 102, "name": "expected_payment_date_c", "comment": null}, "end_date": {"type": "timestamp without time zone", "index": 103, "name": "end_date", "comment": null}, "opportunity_c": {"type": "integer", "index": 104, "name": "opportunity_c", "comment": null}, "meeting_type_c": {"type": "integer", "index": 105, "name": "meeting_type_c", "comment": null}, "meeting_name_c": {"type": "integer", "index": 106, "name": "meeting_name_c", "comment": null}, "bizible_2_bizible_id_c": {"type": "integer", "index": 107, "name": "bizible_2_bizible_id_c", "comment": null}, "bizible_2_bizible_touchpoint_date_c": {"type": "integer", "index": 108, "name": "bizible_2_bizible_touchpoint_date_c", "comment": null}, "assigned_to_role_c": {"type": "integer", "index": 109, "name": "assigned_to_role_c", "comment": null}, "assigned_to_name_c": {"type": "integer", "index": 110, "name": "assigned_to_name_c", "comment": null}, "legacy_hvr_id_c": {"type": "integer", "index": 111, "name": "legacy_hvr_id_c", "comment": null}, "is_archived": {"type": "boolean", "index": 112, "name": "is_archived", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 113, "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.salesforce_source_integration_tests.sf_event_data"}, "seed.salesforce_source_integration_tests.sf_lead_data": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_lead_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"country": {"type": "integer", "index": 1, "name": "country", "comment": null}, "email_bounced_reason": {"type": "integer", "index": 2, "name": "email_bounced_reason", "comment": null}, "email_bounced_date": {"type": "timestamp without time zone", "index": 3, "name": "email_bounced_date", "comment": null}, "owner_id": {"type": "text", "index": 4, "name": "owner_id", "comment": null}, "secondary_email_c": {"type": "integer", "index": 5, "name": "secondary_email_c", "comment": null}, "lead_source": {"type": "integer", "index": 6, "name": "lead_source", "comment": null}, "converted_date": {"type": "timestamp without time zone", "index": 7, "name": "converted_date", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 8, "name": "last_modified_date", "comment": null}, "master_record_id": {"type": "integer", "index": 9, "name": "master_record_id", "comment": null}, "last_modified_by_id": {"type": "text", "index": 10, "name": "last_modified_by_id", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 11, "name": "system_modstamp", "comment": null}, "geocode_accuracy": {"type": "integer", "index": 12, "name": "geocode_accuracy", "comment": null}, "converted_contact_id": {"type": "text", "index": 13, "name": "converted_contact_id", "comment": null}, "up_region_c": {"type": "integer", "index": 14, "name": "up_region_c", "comment": null}, "id": {"type": "text", "index": 15, "name": "id", "comment": null}, "photo_url": {"type": "text", "index": 16, "name": "photo_url", "comment": null}, "state": {"type": "integer", "index": 17, "name": "state", "comment": null}, "longitude": {"type": "integer", "index": 18, "name": "longitude", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 19, "name": "last_referenced_date", "comment": null}, "up_district_c": {"type": "integer", "index": 20, "name": "up_district_c", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 21, "name": "last_activity_date", "comment": null}, "country_code": {"type": "integer", "index": 22, "name": "country_code", "comment": null}, "phone": {"type": "integer", "index": 23, "name": "phone", "comment": null}, "mc_4_sf_mc_subscriber_c": {"type": "integer", "index": 24, "name": "mc_4_sf_mc_subscriber_c", "comment": null}, "name": {"type": "text", "index": 25, "name": "name", "comment": null}, "jigsaw_contact_id": {"type": "integer", "index": 26, "name": "jigsaw_contact_id", "comment": null}, "lead_source_detail_c": {"type": "integer", "index": 27, "name": "lead_source_detail_c", "comment": null}, "created_by_id": {"type": "text", "index": 28, "name": "created_by_id", "comment": null}, "salutation": {"type": "integer", "index": 29, "name": "salutation", "comment": null}, "is_converted": {"type": "boolean", "index": 30, "name": "is_converted", "comment": null}, "state_code": {"type": "integer", "index": 31, "name": "state_code", "comment": null}, "is_unread_by_owner": {"type": "boolean", "index": 32, "name": "is_unread_by_owner", "comment": null}, "status": {"type": "text", "index": 33, "name": "status", "comment": null}, "city": {"type": "integer", "index": 34, "name": "city", "comment": null}, "latitude": {"type": "integer", "index": 35, "name": "latitude", "comment": null}, "cbit_clearbit_c": {"type": "integer", "index": 36, "name": "cbit_clearbit_c", "comment": null}, "industry": {"type": "text", "index": 37, "name": "industry", "comment": null}, "title": {"type": "integer", "index": 38, "name": "title", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 39, "name": "_fivetran_synced", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 40, "name": "last_viewed_date", "comment": null}, "converted_opportunity_id": {"type": "integer", "index": 41, "name": "converted_opportunity_id", "comment": null}, "is_deleted": {"type": "boolean", "index": 42, "name": "is_deleted", "comment": null}, "street": {"type": "integer", "index": 43, "name": "street", "comment": null}, "company": {"type": "text", "index": 44, "name": "company", "comment": null}, "first_name": {"type": "text", "index": 45, "name": "first_name", "comment": null}, "email": {"type": "text", "index": 46, "name": "email", "comment": null}, "website": {"type": "integer", "index": 47, "name": "website", "comment": null}, "last_name": {"type": "text", "index": 48, "name": "last_name", "comment": null}, "number_of_employees": {"type": "integer", "index": 49, "name": "number_of_employees", "comment": null}, "up_territory_c": {"type": "integer", "index": 50, "name": "up_territory_c", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 51, "name": "created_date", "comment": null}, "gclid_c": {"type": "integer", "index": 52, "name": "gclid_c", "comment": null}, "active_in_sequence_c": {"type": "boolean", "index": 53, "name": "active_in_sequence_c", "comment": null}, "postal_code": {"type": "integer", "index": 54, "name": "postal_code", "comment": null}, "cbit_clearbit_ready_c": {"type": "boolean", "index": 55, "name": "cbit_clearbit_ready_c", "comment": null}, "has_opted_out_of_email": {"type": "boolean", "index": 56, "name": "has_opted_out_of_email", "comment": null}, "converted_account_id": {"type": "text", "index": 57, "name": "converted_account_id", "comment": null}, "mobile_phone": {"type": "integer", "index": 58, "name": "mobile_phone", "comment": null}, "calendly_created_c": {"type": "integer", "index": 59, "name": "calendly_created_c", "comment": null}, "account_c": {"type": "integer", "index": 60, "name": "account_c", "comment": null}, "all_connectors_c": {"type": "integer", "index": 61, "name": "all_connectors_c", "comment": null}, "all_data_warehouses_c": {"type": "integer", "index": 62, "name": "all_data_warehouses_c", "comment": null}, "bi_tools_c": {"type": "integer", "index": 63, "name": "bi_tools_c", "comment": null}, "competitors_c": {"type": "integer", "index": 64, "name": "competitors_c", "comment": null}, "annual_revenue": {"type": "integer", "index": 65, "name": "annual_revenue", "comment": null}, "connectors_products_c": {"type": "integer", "index": 66, "name": "connectors_products_c", "comment": null}, "contact_c": {"type": "integer", "index": 67, "name": "contact_c", "comment": null}, "data_warehouse_products_c": {"type": "integer", "index": 68, "name": "data_warehouse_products_c", "comment": null}, "notes_c": {"type": "integer", "index": 69, "name": "notes_c", "comment": null}, "timeframe_c": {"type": "integer", "index": 70, "name": "timeframe_c", "comment": null}, "account_all_products_c": {"type": "integer", "index": 71, "name": "account_all_products_c", "comment": null}, "account_bi_tools_c": {"type": "integer", "index": 72, "name": "account_bi_tools_c", "comment": null}, "account_data_warehouses_c": {"type": "integer", "index": 73, "name": "account_data_warehouses_c", "comment": null}, "opportunity_competitors_c": {"type": "integer", "index": 74, "name": "opportunity_competitors_c", "comment": null}, "opportunity_products_c": {"type": "integer", "index": 75, "name": "opportunity_products_c", "comment": null}, "description": {"type": "integer", "index": 76, "name": "description", "comment": null}, "referral_account_c": {"type": "integer", "index": 77, "name": "referral_account_c", "comment": null}, "referral_contact_c": {"type": "integer", "index": 78, "name": "referral_contact_c", "comment": null}, "volume_in_millions_c": {"type": "integer", "index": 79, "name": "volume_in_millions_c", "comment": null}, "feature_requests_c": {"type": "integer", "index": 80, "name": "feature_requests_c", "comment": null}, "lead_number_c": {"type": "integer", "index": 81, "name": "lead_number_c", "comment": null}, "demo_scheduled_by_calenderly_c": {"type": "boolean", "index": 82, "name": "demo_scheduled_by_calenderly_c", "comment": null}, "to_delete_c": {"type": "boolean", "index": 83, "name": "to_delete_c", "comment": null}, "bounced_email_c": {"type": "integer", "index": 84, "name": "bounced_email_c", "comment": null}, "email_quality_c": {"type": "boolean", "index": 85, "name": "email_quality_c", "comment": null}, "email_quality_catchall_c": {"type": "integer", "index": 86, "name": "email_quality_catchall_c", "comment": null}, "old_lead_source_c": {"type": "integer", "index": 87, "name": "old_lead_source_c", "comment": null}, "email_bounced_c": {"type": "boolean", "index": 88, "name": "email_bounced_c", "comment": null}, "old_lead_source_detail_c": {"type": "integer", "index": 89, "name": "old_lead_source_detail_c", "comment": null}, "utm_medium_c": {"type": "integer", "index": 90, "name": "utm_medium_c", "comment": null}, "utm_source_c": {"type": "integer", "index": 91, "name": "utm_source_c", "comment": null}, "utm_campaign_c": {"type": "integer", "index": 92, "name": "utm_campaign_c", "comment": null}, "utm_content_c": {"type": "integer", "index": 93, "name": "utm_content_c", "comment": null}, "utm_term_c": {"type": "integer", "index": 94, "name": "utm_term_c", "comment": null}, "act_on_lead_score_c": {"type": "integer", "index": 95, "name": "act_on_lead_score_c", "comment": null}, "cbit_created_by_clearbit_c": {"type": "boolean", "index": 96, "name": "cbit_created_by_clearbit_c", "comment": null}, "fivetran_user_id_c": {"type": "integer", "index": 97, "name": "fivetran_user_id_c", "comment": null}, "geo_state_acton_c": {"type": "integer", "index": 98, "name": "geo_state_acton_c", "comment": null}, "actoncountry_c": {"type": "integer", "index": 99, "name": "actoncountry_c", "comment": null}, "actoncity_c": {"type": "integer", "index": 100, "name": "actoncity_c", "comment": null}, "actoncountrycode_c": {"type": "integer", "index": 101, "name": "actoncountrycode_c", "comment": null}, "actonpostalcode_c": {"type": "integer", "index": 102, "name": "actonpostalcode_c", "comment": null}, "actonreferrer_c": {"type": "integer", "index": 103, "name": "actonreferrer_c", "comment": null}, "actonstate_c": {"type": "integer", "index": 104, "name": "actonstate_c", "comment": null}, "geo_city_c": {"type": "integer", "index": 105, "name": "geo_city_c", "comment": null}, "geo_country_c": {"type": "integer", "index": 106, "name": "geo_country_c", "comment": null}, "geo_country_code_c": {"type": "integer", "index": 107, "name": "geo_country_code_c", "comment": null}, "geo_postal_code_c": {"type": "integer", "index": 108, "name": "geo_postal_code_c", "comment": null}, "geo_state_c": {"type": "integer", "index": 109, "name": "geo_state_c", "comment": null}, "company_type_c": {"type": "integer", "index": 110, "name": "company_type_c", "comment": null}, "pi_campaign_c": {"type": "integer", "index": 111, "name": "pi_campaign_c", "comment": null}, "pi_comments_c": {"type": "integer", "index": 112, "name": "pi_comments_c", "comment": null}, "pi_conversion_date_c": {"type": "integer", "index": 113, "name": "pi_conversion_date_c", "comment": null}, "pi_conversion_object_name_c": {"type": "integer", "index": 114, "name": "pi_conversion_object_name_c", "comment": null}, "pi_conversion_object_type_c": {"type": "integer", "index": 115, "name": "pi_conversion_object_type_c", "comment": null}, "pi_created_date_c": {"type": "integer", "index": 116, "name": "pi_created_date_c", "comment": null}, "pi_first_activity_c": {"type": "integer", "index": 117, "name": "pi_first_activity_c", "comment": null}, "pi_first_search_term_c": {"type": "integer", "index": 118, "name": "pi_first_search_term_c", "comment": null}, "pi_first_search_type_c": {"type": "integer", "index": 119, "name": "pi_first_search_type_c", "comment": null}, "pi_first_touch_url_c": {"type": "integer", "index": 120, "name": "pi_first_touch_url_c", "comment": null}, "pi_grade_c": {"type": "integer", "index": 121, "name": "pi_grade_c", "comment": null}, "pi_last_activity_c": {"type": "integer", "index": 122, "name": "pi_last_activity_c", "comment": null}, "pi_needs_score_synced_c": {"type": "integer", "index": 123, "name": "pi_needs_score_synced_c", "comment": null}, "pi_notes_c": {"type": "integer", "index": 124, "name": "pi_notes_c", "comment": null}, "pi_pardot_hard_bounced_c": {"type": "integer", "index": 125, "name": "pi_pardot_hard_bounced_c", "comment": null}, "pi_pardot_last_scored_at_c": {"type": "integer", "index": 126, "name": "pi_pardot_last_scored_at_c", "comment": null}, "pi_score_c": {"type": "integer", "index": 127, "name": "pi_score_c", "comment": null}, "pi_url_c": {"type": "integer", "index": 128, "name": "pi_url_c", "comment": null}, "pi_utm_campaign_c": {"type": "integer", "index": 129, "name": "pi_utm_campaign_c", "comment": null}, "pi_utm_content_c": {"type": "integer", "index": 130, "name": "pi_utm_content_c", "comment": null}, "pi_utm_medium_c": {"type": "integer", "index": 131, "name": "pi_utm_medium_c", "comment": null}, "pi_utm_source_c": {"type": "integer", "index": 132, "name": "pi_utm_source_c", "comment": null}, "pi_utm_term_c": {"type": "integer", "index": 133, "name": "pi_utm_term_c", "comment": null}, "fax": {"type": "integer", "index": 134, "name": "fax", "comment": null}, "region_c": {"type": "integer", "index": 135, "name": "region_c", "comment": null}, "competitor_c": {"type": "boolean", "index": 136, "name": "competitor_c", "comment": null}, "source_detail_c": {"type": "integer", "index": 137, "name": "source_detail_c", "comment": null}, "fivetran_account_stage_c": {"type": "integer", "index": 138, "name": "fivetran_account_stage_c", "comment": null}, "fivetran_account_id_c": {"type": "integer", "index": 139, "name": "fivetran_account_id_c", "comment": null}, "lean_data_router_status_c": {"type": "integer", "index": 140, "name": "lean_data_router_status_c", "comment": null}, "lean_data_matched_lead_c": {"type": "integer", "index": 141, "name": "lean_data_matched_lead_c", "comment": null}, "lean_data_routing_action_c": {"type": "text", "index": 142, "name": "lean_data_routing_action_c", "comment": null}, "lean_data_search_index_c": {"type": "text", "index": 143, "name": "lean_data_search_index_c", "comment": null}, "lean_data_reporting_matched_account_c": {"type": "text", "index": 144, "name": "lean_data_reporting_matched_account_c", "comment": null}, "lean_data_reporting_timestamp_c": {"type": "timestamp without time zone", "index": 145, "name": "lean_data_reporting_timestamp_c", "comment": null}, "lean_data_ld_segment_c": {"type": "integer", "index": 146, "name": "lean_data_ld_segment_c", "comment": null}, "lean_data_marketing_sys_created_date_c": {"type": "integer", "index": 147, "name": "lean_data_marketing_sys_created_date_c", "comment": null}, "lean_data_matched_account_c": {"type": "integer", "index": 148, "name": "lean_data_matched_account_c", "comment": null}, "lean_data_a_2_b_account_c": {"type": "integer", "index": 149, "name": "lean_data_a_2_b_account_c", "comment": null}, "lean_data_search_c": {"type": "integer", "index": 150, "name": "lean_data_search_c", "comment": null}, "lean_data_routing_status_c": {"type": "text", "index": 151, "name": "lean_data_routing_status_c", "comment": null}, "lean_data_a_2_b_group_c": {"type": "integer", "index": 152, "name": "lean_data_a_2_b_group_c", "comment": null}, "lean_data_matched_buyer_persona_c": {"type": "integer", "index": 153, "name": "lean_data_matched_buyer_persona_c", "comment": null}, "lean_data_tag_c": {"type": "integer", "index": 154, "name": "lean_data_tag_c", "comment": null}, "lean_data_status_info_c": {"type": "integer", "index": 155, "name": "lean_data_status_info_c", "comment": null}, "lean_data_modified_score_c": {"type": "integer", "index": 156, "name": "lean_data_modified_score_c", "comment": null}, "do_not_route_lead_c": {"type": "boolean", "index": 157, "name": "do_not_route_lead_c", "comment": null}, "partner_type_c": {"type": "integer", "index": 158, "name": "partner_type_c", "comment": null}, "allbound_id_c": {"type": "integer", "index": 159, "name": "allbound_id_c", "comment": null}, "lid_linked_in_company_id_c": {"type": "integer", "index": 160, "name": "lid_linked_in_company_id_c", "comment": null}, "lid_linked_in_member_token_c": {"type": "integer", "index": 161, "name": "lid_linked_in_member_token_c", "comment": null}, "lean_data_re_route_c": {"type": "integer", "index": 162, "name": "lean_data_re_route_c", "comment": null}, "sales_loft_1_most_recent_cadence_next_step_due_date_c": {"type": "integer", "index": 163, "name": "sales_loft_1_most_recent_cadence_next_step_due_date_c", "comment": null}, "sales_loft_1_most_recent_last_completed_step_c": {"type": "integer", "index": 164, "name": "sales_loft_1_most_recent_last_completed_step_c", "comment": null}, "sales_loft_1_most_recent_cadence_name_c": {"type": "integer", "index": 165, "name": "sales_loft_1_most_recent_cadence_name_c", "comment": null}, "network_c": {"type": "integer", "index": 166, "name": "network_c", "comment": null}, "matchtype_c": {"type": "integer", "index": 167, "name": "matchtype_c", "comment": null}, "device_c": {"type": "integer", "index": 168, "name": "device_c", "comment": null}, "creative_c": {"type": "integer", "index": 169, "name": "creative_c", "comment": null}, "adgroupid_c": {"type": "integer", "index": 170, "name": "adgroupid_c", "comment": null}, "keyword_c": {"type": "integer", "index": 171, "name": "keyword_c", "comment": null}, "campaignid_c": {"type": "integer", "index": 172, "name": "campaignid_c", "comment": null}, "partner_rep_email_c": {"type": "integer", "index": 173, "name": "partner_rep_email_c", "comment": null}, "partner_rep_name_c": {"type": "integer", "index": 174, "name": "partner_rep_name_c", "comment": null}, "lead_type_c": {"type": "integer", "index": 175, "name": "lead_type_c", "comment": null}, "contact_stage_c": {"type": "text", "index": 176, "name": "contact_stage_c", "comment": null}, "original_utm_campaign_c": {"type": "integer", "index": 177, "name": "original_utm_campaign_c", "comment": null}, "original_utm_content_c": {"type": "integer", "index": 178, "name": "original_utm_content_c", "comment": null}, "original_utm_medium_c": {"type": "integer", "index": 179, "name": "original_utm_medium_c", "comment": null}, "original_utm_source_c": {"type": "integer", "index": 180, "name": "original_utm_source_c", "comment": null}, "original_utm_term_c": {"type": "integer", "index": 181, "name": "original_utm_term_c", "comment": null}, "es_app_esalexa_rank_c": {"type": "integer", "index": 182, "name": "es_app_esalexa_rank_c", "comment": null}, "es_app_esaudience_names_c": {"type": "integer", "index": 183, "name": "es_app_esaudience_names_c", "comment": null}, "es_app_escity_c": {"type": "integer", "index": 184, "name": "es_app_escity_c", "comment": null}, "es_app_escompany_phone_c": {"type": "integer", "index": 185, "name": "es_app_escompany_phone_c", "comment": null}, "es_app_escountry_c": {"type": "integer", "index": 186, "name": "es_app_escountry_c", "comment": null}, "es_app_escreated_timestamp_c": {"type": "integer", "index": 187, "name": "es_app_escreated_timestamp_c", "comment": null}, "es_app_esecid_c": {"type": "integer", "index": 188, "name": "es_app_esecid_c", "comment": null}, "es_app_esemployees_c": {"type": "integer", "index": 189, "name": "es_app_esemployees_c", "comment": null}, "es_app_esenriched_c": {"type": "integer", "index": 190, "name": "es_app_esenriched_c", "comment": null}, "es_app_esenriched_timestamp_c": {"type": "integer", "index": 191, "name": "es_app_esenriched_timestamp_c", "comment": null}, "es_app_esfacebook_c": {"type": "integer", "index": 192, "name": "es_app_esfacebook_c", "comment": null}, "es_app_esindustry_c": {"type": "integer", "index": 193, "name": "es_app_esindustry_c", "comment": null}, "es_app_esintent_aggregate_score_c": {"type": "integer", "index": 194, "name": "es_app_esintent_aggregate_score_c", "comment": null}, "es_app_esintent_timestamp_c": {"type": "integer", "index": 195, "name": "es_app_esintent_timestamp_c", "comment": null}, "es_app_esintent_topics_c": {"type": "integer", "index": 196, "name": "es_app_esintent_topics_c", "comment": null}, "es_app_eskeywords_c": {"type": "integer", "index": 197, "name": "es_app_eskeywords_c", "comment": null}, "es_app_eslinked_in_c": {"type": "integer", "index": 198, "name": "es_app_eslinked_in_c", "comment": null}, "es_app_esoverall_fit_score_c": {"type": "integer", "index": 199, "name": "es_app_esoverall_fit_score_c", "comment": null}, "es_app_esrevenue_c": {"type": "integer", "index": 200, "name": "es_app_esrevenue_c", "comment": null}, "es_app_essource_c": {"type": "integer", "index": 201, "name": "es_app_essource_c", "comment": null}, "es_app_esstate_c": {"type": "integer", "index": 202, "name": "es_app_esstate_c", "comment": null}, "es_app_esstreet_c": {"type": "integer", "index": 203, "name": "es_app_esstreet_c", "comment": null}, "es_app_estechnologies_c": {"type": "integer", "index": 204, "name": "es_app_estechnologies_c", "comment": null}, "es_app_estwitter_c": {"type": "integer", "index": 205, "name": "es_app_estwitter_c", "comment": null}, "es_app_eszipcode_c": {"type": "integer", "index": 206, "name": "es_app_eszipcode_c", "comment": null}, "marketing_prospect_routing_rules_c": {"type": "boolean", "index": 207, "name": "marketing_prospect_routing_rules_c", "comment": null}, "individual_id": {"type": "integer", "index": 208, "name": "individual_id", "comment": null}, "marketing_process_c": {"type": "integer", "index": 209, "name": "marketing_process_c", "comment": null}, "automation_tracking_c": {"type": "integer", "index": 210, "name": "automation_tracking_c", "comment": null}, "user_gems_has_changed_job_c": {"type": "integer", "index": 211, "name": "user_gems_has_changed_job_c", "comment": null}, "user_gems_linked_in_c": {"type": "integer", "index": 212, "name": "user_gems_linked_in_c", "comment": null}, "email_opt_in_c": {"type": "integer", "index": 213, "name": "email_opt_in_c", "comment": null}, "email_opt_in_explicit_c": {"type": "boolean", "index": 214, "name": "email_opt_in_explicit_c", "comment": null}, "email_opt_in_implicit_c": {"type": "boolean", "index": 215, "name": "email_opt_in_implicit_c", "comment": null}, "gdpr_opt_in_explicit_c": {"type": "boolean", "index": 216, "name": "gdpr_opt_in_explicit_c", "comment": null}, "user_gems_is_a_user_gem_c": {"type": "boolean", "index": 217, "name": "user_gems_is_a_user_gem_c", "comment": null}, "user_gems_past_account_c": {"type": "integer", "index": 218, "name": "user_gems_past_account_c", "comment": null}, "user_gems_past_company_c": {"type": "integer", "index": 219, "name": "user_gems_past_company_c", "comment": null}, "user_gems_past_contact_c": {"type": "integer", "index": 220, "name": "user_gems_past_contact_c", "comment": null}, "user_gems_past_title_c": {"type": "integer", "index": 221, "name": "user_gems_past_title_c", "comment": null}, "promotion_id_c": {"type": "integer", "index": 222, "name": "promotion_id_c", "comment": null}, "previous_customer_c": {"type": "integer", "index": 223, "name": "previous_customer_c", "comment": null}, "referral_contact_email_c": {"type": "integer", "index": 224, "name": "referral_contact_email_c", "comment": null}, "referral_firstname_c": {"type": "integer", "index": 225, "name": "referral_firstname_c", "comment": null}, "referral_last_name_c": {"type": "integer", "index": 226, "name": "referral_last_name_c", "comment": null}, "mkto_71_lead_score_c": {"type": "integer", "index": 227, "name": "mkto_71_lead_score_c", "comment": null}, "mkto_71_acquisition_date_c": {"type": "integer", "index": 228, "name": "mkto_71_acquisition_date_c", "comment": null}, "mkto_71_acquisition_program_id_c": {"type": "integer", "index": 229, "name": "mkto_71_acquisition_program_id_c", "comment": null}, "mkto_acquisition_program_c": {"type": "integer", "index": 230, "name": "mkto_acquisition_program_c", "comment": null}, "mkto_71_inferred_city_c": {"type": "integer", "index": 231, "name": "mkto_71_inferred_city_c", "comment": null}, "mkto_71_inferred_company_c": {"type": "integer", "index": 232, "name": "mkto_71_inferred_company_c", "comment": null}, "mkto_71_inferred_country_c": {"type": "integer", "index": 233, "name": "mkto_71_inferred_country_c", "comment": null}, "mkto_71_inferred_metropolitan_area_c": {"type": "integer", "index": 234, "name": "mkto_71_inferred_metropolitan_area_c", "comment": null}, "mkto_71_inferred_phone_area_code_c": {"type": "integer", "index": 235, "name": "mkto_71_inferred_phone_area_code_c", "comment": null}, "mkto_71_inferred_postal_code_c": {"type": "integer", "index": 236, "name": "mkto_71_inferred_postal_code_c", "comment": null}, "mkto_71_inferred_state_region_c": {"type": "integer", "index": 237, "name": "mkto_71_inferred_state_region_c", "comment": null}, "mkto_71_original_referrer_c": {"type": "integer", "index": 238, "name": "mkto_71_original_referrer_c", "comment": null}, "mkto_71_original_search_engine_c": {"type": "integer", "index": 239, "name": "mkto_71_original_search_engine_c", "comment": null}, "mkto_71_original_search_phrase_c": {"type": "integer", "index": 240, "name": "mkto_71_original_search_phrase_c", "comment": null}, "mkto_71_original_source_info_c": {"type": "integer", "index": 241, "name": "mkto_71_original_source_info_c", "comment": null}, "mkto_71_original_source_type_c": {"type": "integer", "index": 242, "name": "mkto_71_original_source_type_c", "comment": null}, "mkto_si_hide_date_c": {"type": "integer", "index": 243, "name": "mkto_si_hide_date_c", "comment": null}, "mkto_si_last_interesting_moment_date_c": {"type": "timestamp without time zone", "index": 244, "name": "mkto_si_last_interesting_moment_date_c", "comment": null}, "mkto_si_last_interesting_moment_desc_c": {"type": "text", "index": 245, "name": "mkto_si_last_interesting_moment_desc_c", "comment": null}, "mkto_si_last_interesting_moment_source_c": {"type": "text", "index": 246, "name": "mkto_si_last_interesting_moment_source_c", "comment": null}, "mkto_si_last_interesting_moment_type_c": {"type": "text", "index": 247, "name": "mkto_si_last_interesting_moment_type_c", "comment": null}, "mkto_si_msicontact_id_c": {"type": "integer", "index": 248, "name": "mkto_si_msicontact_id_c", "comment": null}, "mkto_si_priority_c": {"type": "integer", "index": 249, "name": "mkto_si_priority_c", "comment": null}, "mkto_si_relative_score_value_c": {"type": "integer", "index": 250, "name": "mkto_si_relative_score_value_c", "comment": null}, "mkto_si_urgency_value_c": {"type": "integer", "index": 251, "name": "mkto_si_urgency_value_c", "comment": null}, "cloudingo_agent_ar_c": {"type": "integer", "index": 252, "name": "cloudingo_agent_ar_c", "comment": null}, "cloudingo_agent_ardi_c": {"type": "integer", "index": 253, "name": "cloudingo_agent_ardi_c", "comment": null}, "cloudingo_agent_as_c": {"type": "integer", "index": 254, "name": "cloudingo_agent_as_c", "comment": null}, "cloudingo_agent_atz_c": {"type": "integer", "index": 255, "name": "cloudingo_agent_atz_c", "comment": null}, "cloudingo_agent_av_c": {"type": "integer", "index": 256, "name": "cloudingo_agent_av_c", "comment": null}, "cloudingo_agent_les_c": {"type": "integer", "index": 257, "name": "cloudingo_agent_les_c", "comment": null}, "do_not_sync_marketo_c": {"type": "boolean", "index": 258, "name": "do_not_sync_marketo_c", "comment": null}, "source_every_utm_campaign_c": {"type": "integer", "index": 259, "name": "source_every_utm_campaign_c", "comment": null}, "source_every_utm_content_c": {"type": "integer", "index": 260, "name": "source_every_utm_content_c", "comment": null}, "source_every_utm_medium_c": {"type": "integer", "index": 261, "name": "source_every_utm_medium_c", "comment": null}, "source_every_utm_source_c": {"type": "integer", "index": 262, "name": "source_every_utm_source_c", "comment": null}, "source_every_utm_term_c": {"type": "integer", "index": 263, "name": "source_every_utm_term_c", "comment": null}, "source_first_utm_campaign_c": {"type": "integer", "index": 264, "name": "source_first_utm_campaign_c", "comment": null}, "source_first_utm_content_c": {"type": "integer", "index": 265, "name": "source_first_utm_content_c", "comment": null}, "source_first_utm_medium_c": {"type": "integer", "index": 266, "name": "source_first_utm_medium_c", "comment": null}, "source_first_utm_source_c": {"type": "integer", "index": 267, "name": "source_first_utm_source_c", "comment": null}, "source_first_utm_term_c": {"type": "integer", "index": 268, "name": "source_first_utm_term_c", "comment": null}, "source_last_utm_campaign_c": {"type": "text", "index": 269, "name": "source_last_utm_campaign_c", "comment": null}, "source_last_utm_content_c": {"type": "text", "index": 270, "name": "source_last_utm_content_c", "comment": null}, "source_last_utm_medium_c": {"type": "text", "index": 271, "name": "source_last_utm_medium_c", "comment": null}, "source_last_utm_source_c": {"type": "text", "index": 272, "name": "source_last_utm_source_c", "comment": null}, "source_last_utm_term_c": {"type": "text", "index": 273, "name": "source_last_utm_term_c", "comment": null}, "direct_office_c": {"type": "integer", "index": 274, "name": "direct_office_c", "comment": null}, "city_c": {"type": "integer", "index": 275, "name": "city_c", "comment": null}, "country_c": {"type": "integer", "index": 276, "name": "country_c", "comment": null}, "state_c": {"type": "integer", "index": 277, "name": "state_c", "comment": null}, "source_first_lead_source_category_c": {"type": "integer", "index": 278, "name": "source_first_lead_source_category_c", "comment": null}, "source_last_lead_source_c": {"type": "integer", "index": 279, "name": "source_last_lead_source_c", "comment": null}, "source_last_lead_source_category_c": {"type": "integer", "index": 280, "name": "source_last_lead_source_category_c", "comment": null}, "source_last_lead_source_detail_c": {"type": "integer", "index": 281, "name": "source_last_lead_source_detail_c", "comment": null}, "source_every_lead_source_c": {"type": "integer", "index": 282, "name": "source_every_lead_source_c", "comment": null}, "source_every_lead_source_category_c": {"type": "integer", "index": 283, "name": "source_every_lead_source_category_c", "comment": null}, "source_every_lead_source_detail_c": {"type": "integer", "index": 284, "name": "source_every_lead_source_detail_c", "comment": null}, "source_first_lead_source_c": {"type": "integer", "index": 285, "name": "source_first_lead_source_c", "comment": null}, "source_first_lead_source_detail_c": {"type": "integer", "index": 286, "name": "source_first_lead_source_detail_c", "comment": null}, "behavioral_score_c": {"type": "integer", "index": 287, "name": "behavioral_score_c", "comment": null}, "demographic_score_c": {"type": "integer", "index": 288, "name": "demographic_score_c", "comment": null}, "drift_cql_c": {"type": "integer", "index": 289, "name": "drift_cql_c", "comment": null}, "unique_email_c": {"type": "integer", "index": 290, "name": "unique_email_c", "comment": null}, "is_emea_event_routing_c": {"type": "boolean", "index": 291, "name": "is_emea_event_routing_c", "comment": null}, "csi_code_c": {"type": "integer", "index": 292, "name": "csi_code_c", "comment": null}, "csi_description_c": {"type": "text", "index": 293, "name": "csi_description_c", "comment": null}, "converted_date_time_c": {"type": "timestamp without time zone", "index": 294, "name": "converted_date_time_c", "comment": null}, "lead_created_date_time_reporting_c": {"type": "timestamp without time zone", "index": 295, "name": "lead_created_date_time_reporting_c", "comment": null}, "lead_iq_country_c": {"type": "integer", "index": 296, "name": "lead_iq_country_c", "comment": null}, "lead_iq_employee_count_c": {"type": "integer", "index": 297, "name": "lead_iq_employee_count_c", "comment": null}, "lead_iq_employee_range_c": {"type": "integer", "index": 298, "name": "lead_iq_employee_range_c", "comment": null}, "lead_iq_state_c": {"type": "integer", "index": 299, "name": "lead_iq_state_c", "comment": null}, "lead_iq_zip_code_c": {"type": "integer", "index": 300, "name": "lead_iq_zip_code_c", "comment": null}, "zoominfo_country_c": {"type": "integer", "index": 301, "name": "zoominfo_country_c", "comment": null}, "zoominfo_employee_count_c": {"type": "integer", "index": 302, "name": "zoominfo_employee_count_c", "comment": null}, "zoominfo_state_c": {"type": "integer", "index": 303, "name": "zoominfo_state_c", "comment": null}, "zoominfo_technologies_c": {"type": "integer", "index": 304, "name": "zoominfo_technologies_c", "comment": null}, "zoominfo_zip_code_c": {"type": "integer", "index": 305, "name": "zoominfo_zip_code_c", "comment": null}, "attended_event_c": {"type": "boolean", "index": 306, "name": "attended_event_c", "comment": null}, "mql_date_c": {"type": "integer", "index": 307, "name": "mql_date_c", "comment": null}, "user_gems_user_gems_id_c": {"type": "integer", "index": 308, "name": "user_gems_user_gems_id_c", "comment": null}, "dozisf_zoom_info_company_id_c": {"type": "integer", "index": 309, "name": "dozisf_zoom_info_company_id_c", "comment": null}, "dozisf_zoom_info_first_updated_c": {"type": "integer", "index": 310, "name": "dozisf_zoom_info_first_updated_c", "comment": null}, "dozisf_zoom_info_id_c": {"type": "integer", "index": 311, "name": "dozisf_zoom_info_id_c", "comment": null}, "dozisf_zoom_info_last_updated_c": {"type": "integer", "index": 312, "name": "dozisf_zoom_info_last_updated_c", "comment": null}, "lean_data_manual_route_trigger_c": {"type": "boolean", "index": 313, "name": "lean_data_manual_route_trigger_c", "comment": null}, "first_mql_date_c": {"type": "integer", "index": 314, "name": "first_mql_date_c", "comment": null}, "fivetran_account_association_date_c": {"type": "integer", "index": 315, "name": "fivetran_account_association_date_c", "comment": null}, "fivetran_account_user_role_s_c": {"type": "integer", "index": 316, "name": "fivetran_account_user_role_s_c", "comment": null}, "mql_reason_c": {"type": "text", "index": 317, "name": "mql_reason_c", "comment": null}, "trial_contact_start_date_c": {"type": "integer", "index": 318, "name": "trial_contact_start_date_c", "comment": null}, "enrichment_request_c": {"type": "boolean", "index": 319, "name": "enrichment_request_c", "comment": null}, "meta_data_create_date_c": {"type": "timestamp without time zone", "index": 320, "name": "meta_data_create_date_c", "comment": null}, "clarus_date_c": {"type": "integer", "index": 321, "name": "clarus_date_c", "comment": null}, "clarus_editor_c": {"type": "integer", "index": 322, "name": "clarus_editor_c", "comment": null}, "clarus_notes_c": {"type": "integer", "index": 323, "name": "clarus_notes_c", "comment": null}, "clarus_project_c": {"type": "integer", "index": 324, "name": "clarus_project_c", "comment": null}, "clarus_status_c": {"type": "integer", "index": 325, "name": "clarus_status_c", "comment": null}, "marketing_connector_interest_c": {"type": "integer", "index": 326, "name": "marketing_connector_interest_c", "comment": null}, "recent_marketing_campaign_status_c": {"type": "integer", "index": 327, "name": "recent_marketing_campaign_status_c", "comment": null}, "salesloft_cadence_trigger_c": {"type": "integer", "index": 328, "name": "salesloft_cadence_trigger_c", "comment": null}, "datawarehouse_used_c": {"type": "integer", "index": 329, "name": "datawarehouse_used_c", "comment": null}, "contact_status_c": {"type": "integer", "index": 330, "name": "contact_status_c", "comment": null}, "leandata_contact_owner_override_c": {"type": "integer", "index": 331, "name": "leandata_contact_owner_override_c", "comment": null}, "potential_fivetran_use_case_c": {"type": "text", "index": 332, "name": "potential_fivetran_use_case_c", "comment": null}, "bizible_2_account_c": {"type": "integer", "index": 333, "name": "bizible_2_account_c", "comment": null}, "bizible_2_ad_campaign_name_ft_c": {"type": "integer", "index": 334, "name": "bizible_2_ad_campaign_name_ft_c", "comment": null}, "bizible_2_ad_campaign_name_lc_c": {"type": "integer", "index": 335, "name": "bizible_2_ad_campaign_name_lc_c", "comment": null}, "bizible_2_bizible_id_c": {"type": "integer", "index": 336, "name": "bizible_2_bizible_id_c", "comment": null}, "bizible_2_landing_page_ft_c": {"type": "integer", "index": 337, "name": "bizible_2_landing_page_ft_c", "comment": null}, "bizible_2_landing_page_lc_c": {"type": "integer", "index": 338, "name": "bizible_2_landing_page_lc_c", "comment": null}, "bizible_2_marketing_channel_ft_c": {"type": "integer", "index": 339, "name": "bizible_2_marketing_channel_ft_c", "comment": null}, "bizible_2_marketing_channel_lc_c": {"type": "integer", "index": 340, "name": "bizible_2_marketing_channel_lc_c", "comment": null}, "bizible_2_touchpoint_date_ft_c": {"type": "integer", "index": 341, "name": "bizible_2_touchpoint_date_ft_c", "comment": null}, "bizible_2_touchpoint_date_lc_c": {"type": "integer", "index": 342, "name": "bizible_2_touchpoint_date_lc_c", "comment": null}, "bizible_2_touchpoint_source_ft_c": {"type": "integer", "index": 343, "name": "bizible_2_touchpoint_source_ft_c", "comment": null}, "bizible_2_touchpoint_source_lc_c": {"type": "integer", "index": 344, "name": "bizible_2_touchpoint_source_lc_c", "comment": null}, "sales_email_opt_out_c": {"type": "boolean", "index": 345, "name": "sales_email_opt_out_c", "comment": null}, "sales_email_opt_out_date_time_c": {"type": "integer", "index": 346, "name": "sales_email_opt_out_date_time_c", "comment": null}, "bombora_app_bombora_surge_record_count_c": {"type": "integer", "index": 347, "name": "bombora_app_bombora_surge_record_count_c", "comment": null}, "bombora_app_bombora_last_date_time_updated_c": {"type": "integer", "index": 348, "name": "bombora_app_bombora_last_date_time_updated_c", "comment": null}, "bombora_app_bombora_total_composite_score_c": {"type": "integer", "index": 349, "name": "bombora_app_bombora_total_composite_score_c", "comment": null}, "linked_in_url_c": {"type": "integer", "index": 350, "name": "linked_in_url_c", "comment": null}, "beta_connector_interest_c": {"type": "integer", "index": 351, "name": "beta_connector_interest_c", "comment": null}, "user_gems_ug_past_infos_c": {"type": "integer", "index": 352, "name": "user_gems_ug_past_infos_c", "comment": null}, "user_gems_ug_current_infos_c": {"type": "integer", "index": 353, "name": "user_gems_ug_current_infos_c", "comment": null}, "user_gems_ug_created_by_ug_c": {"type": "boolean", "index": 354, "name": "user_gems_ug_created_by_ug_c", "comment": null}, "free_trial_email_confirmed_date_c": {"type": "integer", "index": 355, "name": "free_trial_email_confirmed_date_c", "comment": null}, "dnboptimizer_dn_bcontact_record_c": {"type": "integer", "index": 356, "name": "dnboptimizer_dn_bcontact_record_c", "comment": null}, "dnboptimizer_dn_bcompany_record_c": {"type": "integer", "index": 357, "name": "dnboptimizer_dn_bcompany_record_c", "comment": null}, "dnboptimizer_dnb_d_u_n_s_number_c": {"type": "integer", "index": 358, "name": "dnboptimizer_dnb_d_u_n_s_number_c", "comment": null}, "i_sell_oskey_id_c": {"type": "integer", "index": 359, "name": "i_sell_oskey_id_c", "comment": null}, "verified_c": {"type": "boolean", "index": 360, "name": "verified_c", "comment": null}, "email_opt_out_date_time_c": {"type": "integer", "index": 361, "name": "email_opt_out_date_time_c", "comment": null}, "pbf_startup_c": {"type": "integer", "index": 362, "name": "pbf_startup_c", "comment": null}, "pbf_startup_certify_eligibility_c": {"type": "boolean", "index": 363, "name": "pbf_startup_certify_eligibility_c", "comment": null}, "engagio_intent_minutes_last_30_days_c": {"type": "integer", "index": 364, "name": "engagio_intent_minutes_last_30_days_c", "comment": null}, "engagio_engagement_minutes_last_3_months_c": {"type": "integer", "index": 365, "name": "engagio_engagement_minutes_last_3_months_c", "comment": null}, "engagio_engagement_minutes_last_7_days_c": {"type": "integer", "index": 366, "name": "engagio_engagement_minutes_last_7_days_c", "comment": null}, "engagio_matched_account_c": {"type": "integer", "index": 367, "name": "engagio_matched_account_c", "comment": null}, "engagio_first_engagement_date_c": {"type": "integer", "index": 368, "name": "engagio_first_engagement_date_c", "comment": null}, "engagio_match_time_c": {"type": "integer", "index": 369, "name": "engagio_match_time_c", "comment": null}, "engagio_department_c": {"type": "integer", "index": 370, "name": "engagio_department_c", "comment": null}, "engagio_role_c": {"type": "integer", "index": 371, "name": "engagio_role_c", "comment": null}, "legacy_hvr_id_c": {"type": "integer", "index": 372, "name": "legacy_hvr_id_c", "comment": null}, "hvr_channel_c": {"type": "integer", "index": 373, "name": "hvr_channel_c", "comment": null}, "email_opt_in_double_c": {"type": "boolean", "index": 374, "name": "email_opt_in_double_c", "comment": null}, "phone_number_catch_all_c": {"type": "integer", "index": 375, "name": "phone_number_catch_all_c", "comment": null}, "contacts_domain_exists_c": {"type": "integer", "index": 376, "name": "contacts_domain_exists_c", "comment": null}, "utm_id_c": {"type": "integer", "index": 377, "name": "utm_id_c", "comment": null}, "source_every_utm_id_c": {"type": "integer", "index": 378, "name": "source_every_utm_id_c", "comment": null}, "source_last_utm_id_c": {"type": "integer", "index": 379, "name": "source_last_utm_id_c", "comment": null}, "source_first_utm_id_c": {"type": "integer", "index": 380, "name": "source_first_utm_id_c", "comment": null}, "do_not_sync_reason_marketo_c": {"type": "integer", "index": 381, "name": "do_not_sync_reason_marketo_c", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 382, "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.salesforce_source_integration_tests.sf_lead_data"}, "seed.salesforce_source_integration_tests.sf_opportunity_data": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_opportunity_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "amount": {"type": "double precision", "index": 3, "name": "amount", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "close_date": {"type": "timestamp without time zone", "index": 5, "name": "close_date", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 6, "name": "created_date", "comment": null}, "description": {"type": "integer", "index": 7, "name": "description", "comment": null}, "expected_revenue": {"type": "integer", "index": 8, "name": "expected_revenue", "comment": null}, "fiscal": {"type": "text", "index": 9, "name": "fiscal", "comment": null}, "fiscal_quarter": {"type": "integer", "index": 10, "name": "fiscal_quarter", "comment": null}, "fiscal_year": {"type": "integer", "index": 11, "name": "fiscal_year", "comment": null}, "forecast_category": {"type": "text", "index": 12, "name": "forecast_category", "comment": null}, "forecast_category_name": {"type": "text", "index": 13, "name": "forecast_category_name", "comment": null}, "has_open_activity": {"type": "boolean", "index": 14, "name": "has_open_activity", "comment": null}, "has_opportunity_line_item": {"type": "boolean", "index": 15, "name": "has_opportunity_line_item", "comment": null}, "has_overdue_task": {"type": "boolean", "index": 16, "name": "has_overdue_task", "comment": null}, "id": {"type": "text", "index": 17, "name": "id", "comment": null}, "is_closed": {"type": "boolean", "index": 18, "name": "is_closed", "comment": null}, "is_deleted": {"type": "boolean", "index": 19, "name": "is_deleted", "comment": null}, "is_excluded_from_territory_2_filter": {"type": "integer", "index": 20, "name": "is_excluded_from_territory_2_filter", "comment": null}, "is_won": {"type": "boolean", "index": 21, "name": "is_won", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 22, "name": "last_activity_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 23, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 24, "name": "last_viewed_date", "comment": null}, "lead_source": {"type": "text", "index": 25, "name": "lead_source", "comment": null}, "name": {"type": "text", "index": 26, "name": "name", "comment": null}, "next_step": {"type": "integer", "index": 27, "name": "next_step", "comment": null}, "owner_id": {"type": "text", "index": 28, "name": "owner_id", "comment": null}, "pricebook_2_id": {"type": "text", "index": 29, "name": "pricebook_2_id", "comment": null}, "probability": {"type": "double precision", "index": 30, "name": "probability", "comment": null}, "record_type_id": {"type": "text", "index": 31, "name": "record_type_id", "comment": null}, "stage_name": {"type": "text", "index": 32, "name": "stage_name", "comment": null}, "synced_quote_id": {"type": "integer", "index": 33, "name": "synced_quote_id", "comment": null}, "territory_2_id": {"type": "integer", "index": 34, "name": "territory_2_id", "comment": null}, "type": {"type": "text", "index": 35, "name": "type", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 36, "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.salesforce_source_integration_tests.sf_opportunity_data"}, "seed.salesforce_source_integration_tests.sf_opportunity_history_data": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_opportunity_history_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_active": {"type": "boolean", "index": 1, "name": "_fivetran_active", "comment": null}, "_fivetran_start": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_start", "comment": null}, "_fivetran_end": {"type": "timestamp without time zone", "index": 3, "name": "_fivetran_end", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 4, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 5, "name": "account_id", "comment": null}, "amount": {"type": "double precision", "index": 6, "name": "amount", "comment": null}, "campaign_id": {"type": "integer", "index": 7, "name": "campaign_id", "comment": null}, "close_date": {"type": "timestamp without time zone", "index": 8, "name": "close_date", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 9, "name": "created_date", "comment": null}, "description": {"type": "integer", "index": 10, "name": "description", "comment": null}, "expected_revenue": {"type": "double precision", "index": 11, "name": "expected_revenue", "comment": null}, "fiscal": {"type": "text", "index": 12, "name": "fiscal", "comment": null}, "fiscal_quarter": {"type": "integer", "index": 13, "name": "fiscal_quarter", "comment": null}, "fiscal_year": {"type": "integer", "index": 14, "name": "fiscal_year", "comment": null}, "forecast_category": {"type": "text", "index": 15, "name": "forecast_category", "comment": null}, "forecast_category_name": {"type": "text", "index": 16, "name": "forecast_category_name", "comment": null}, "has_open_activity": {"type": "boolean", "index": 17, "name": "has_open_activity", "comment": null}, "has_opportunity_line_item": {"type": "boolean", "index": 18, "name": "has_opportunity_line_item", "comment": null}, "has_overdue_task": {"type": "boolean", "index": 19, "name": "has_overdue_task", "comment": null}, "id": {"type": "text", "index": 20, "name": "id", "comment": null}, "is_closed": {"type": "boolean", "index": 21, "name": "is_closed", "comment": null}, "is_deleted": {"type": "boolean", "index": 22, "name": "is_deleted", "comment": null}, "is_won": {"type": "boolean", "index": 23, "name": "is_won", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 24, "name": "last_activity_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 25, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 26, "name": "last_viewed_date", "comment": null}, "lead_source": {"type": "text", "index": 27, "name": "lead_source", "comment": null}, "name": {"type": "text", "index": 28, "name": "name", "comment": null}, "next_step": {"type": "integer", "index": 29, "name": "next_step", "comment": null}, "owner_id": {"type": "text", "index": 30, "name": "owner_id", "comment": null}, "probability": {"type": "integer", "index": 31, "name": "probability", "comment": null}, "record_type_id": {"type": "text", "index": 32, "name": "record_type_id", "comment": null}, "stage_name": {"type": "text", "index": 33, "name": "stage_name", "comment": null}, "synced_quote_id": {"type": "integer", "index": 34, "name": "synced_quote_id", "comment": null}, "type": {"type": "text", "index": 35, "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.salesforce_source_integration_tests.sf_opportunity_history_data"}, "seed.salesforce_source_integration_tests.sf_opportunity_line_item_data": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_opportunity_line_item_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"product_2_id": {"type": "text", "index": 1, "name": "product_2_id", "comment": null}, "quantity": {"type": "integer", "index": 2, "name": "quantity", "comment": null}, "total_price": {"type": "double precision", "index": 3, "name": "total_price", "comment": null}, "description": {"type": "integer", "index": 4, "name": "description", "comment": null}, "discount": {"type": "integer", "index": 5, "name": "discount", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 6, "name": "last_modified_date", "comment": null}, "list_price": {"type": "integer", "index": 7, "name": "list_price", "comment": null}, "product_code": {"type": "text", "index": 8, "name": "product_code", "comment": null}, "unit_price": {"type": "double precision", "index": 9, "name": "unit_price", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 10, "name": "_fivetran_synced", "comment": null}, "is_deleted": {"type": "boolean", "index": 11, "name": "is_deleted", "comment": null}, "opportunity_id": {"type": "text", "index": 12, "name": "opportunity_id", "comment": null}, "last_modified_by_id": {"type": "text", "index": 13, "name": "last_modified_by_id", "comment": null}, "service_date": {"type": "timestamp without time zone", "index": 14, "name": "service_date", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 15, "name": "system_modstamp", "comment": null}, "name": {"type": "text", "index": 16, "name": "name", "comment": null}, "id": {"type": "text", "index": 17, "name": "id", "comment": null}, "created_by_id": {"type": "text", "index": 18, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 19, "name": "created_date", "comment": null}, "sort_order": {"type": "integer", "index": 20, "name": "sort_order", "comment": null}, "pricebook_entry_id": {"type": "text", "index": 21, "name": "pricebook_entry_id", "comment": null}, "one_saas_app_included_c": {"type": "integer", "index": 22, "name": "one_saas_app_included_c", "comment": null}, "one_saas_app_quantity_invoiced_c": {"type": "integer", "index": 23, "name": "one_saas_app_quantity_invoiced_c", "comment": null}, "one_saas_app_quantity_not_invoiced_c": {"type": "integer", "index": 24, "name": "one_saas_app_quantity_not_invoiced_c", "comment": null}, "has_quantity_schedule": {"type": "integer", "index": 25, "name": "has_quantity_schedule", "comment": null}, "has_revenue_schedule": {"type": "integer", "index": 26, "name": "has_revenue_schedule", "comment": null}, "has_schedule": {"type": "integer", "index": 27, "name": "has_schedule", "comment": null}, "event_volume_c": {"type": "integer", "index": 28, "name": "event_volume_c", "comment": null}, "roadmap_connections_c": {"type": "integer", "index": 29, "name": "roadmap_connections_c", "comment": null}, "row_volume_c": {"type": "integer", "index": 30, "name": "row_volume_c", "comment": null}, "months_c": {"type": "integer", "index": 31, "name": "months_c", "comment": null}, "netsuite_conn_term_contract_pricing_type_c": {"type": "integer", "index": 32, "name": "netsuite_conn_term_contract_pricing_type_c", "comment": null}, "netsuite_conn_discount_item_c": {"type": "integer", "index": 33, "name": "netsuite_conn_discount_item_c", "comment": null}, "netsuite_conn_user_entered_sales_price_c": {"type": "integer", "index": 34, "name": "netsuite_conn_user_entered_sales_price_c", "comment": null}, "netsuite_conn_item_category_c": {"type": "integer", "index": 35, "name": "netsuite_conn_item_category_c", "comment": null}, "netsuite_conn_terms_c": {"type": "integer", "index": 36, "name": "netsuite_conn_terms_c", "comment": null}, "netsuite_conn_net_suite_item_key_id_c": {"type": "integer", "index": 37, "name": "netsuite_conn_net_suite_item_key_id_c", "comment": null}, "netsuite_conn_pushed_from_net_suite_c": {"type": "boolean", "index": 38, "name": "netsuite_conn_pushed_from_net_suite_c", "comment": null}, "netsuite_conn_end_date_c": {"type": "integer", "index": 39, "name": "netsuite_conn_end_date_c", "comment": null}, "netsuite_conn_list_rate_c": {"type": "integer", "index": 40, "name": "netsuite_conn_list_rate_c", "comment": null}, "netsuite_conn_from_contract_item_id_c": {"type": "integer", "index": 41, "name": "netsuite_conn_from_contract_item_id_c", "comment": null}, "netsuite_conn_start_date_c": {"type": "integer", "index": 42, "name": "netsuite_conn_start_date_c", "comment": null}, "netsuite_conn_net_suite_item_id_import_c": {"type": "integer", "index": 43, "name": "netsuite_conn_net_suite_item_id_import_c", "comment": null}, "sbqq_parent_id_c": {"type": "text", "index": 44, "name": "sbqq_parent_id_c", "comment": null}, "sbqq_quote_line_c": {"type": "text", "index": 45, "name": "sbqq_quote_line_c", "comment": null}, "sbqq_subscription_type_c": {"type": "text", "index": 46, "name": "sbqq_subscription_type_c", "comment": null}, "product_family_c": {"type": "text", "index": 47, "name": "product_family_c", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 48, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 49, "name": "last_viewed_date", "comment": null}, "celigo_sfnsio_contract_item_id_c": {"type": "integer", "index": 50, "name": "celigo_sfnsio_contract_item_id_c", "comment": null}, "celigo_sfnsio_contract_term_c": {"type": "integer", "index": 51, "name": "celigo_sfnsio_contract_term_c", "comment": null}, "celigo_sfnsio_end_date_c": {"type": "integer", "index": 52, "name": "celigo_sfnsio_end_date_c", "comment": null}, "celigo_sfnsio_list_rate_c": {"type": "integer", "index": 53, "name": "celigo_sfnsio_list_rate_c", "comment": null}, "celigo_sfnsio_net_suite_line_id_c": {"type": "integer", "index": 54, "name": "celigo_sfnsio_net_suite_line_id_c", "comment": null}, "celigo_sfnsio_start_date_c": {"type": "integer", "index": 55, "name": "celigo_sfnsio_start_date_c", "comment": null}, "product_code_stamped_c": {"type": "integer", "index": 56, "name": "product_code_stamped_c", "comment": null}, "hvr_use_case_c": {"type": "boolean", "index": 57, "name": "hvr_use_case_c", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 58, "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.salesforce_source_integration_tests.sf_opportunity_line_item_data"}, "seed.salesforce_source_integration_tests.sf_order_data": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_order_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "activated_by_id": {"type": "text", "index": 4, "name": "activated_by_id", "comment": null}, "activated_date": {"type": "timestamp without time zone", "index": 5, "name": "activated_date", "comment": null}, "billing_city": {"type": "text", "index": 6, "name": "billing_city", "comment": null}, "billing_country": {"type": "text", "index": 7, "name": "billing_country", "comment": null}, "billing_country_code": {"type": "integer", "index": 8, "name": "billing_country_code", "comment": null}, "billing_geocode_accuracy": {"type": "integer", "index": 9, "name": "billing_geocode_accuracy", "comment": null}, "billing_latitude": {"type": "integer", "index": 10, "name": "billing_latitude", "comment": null}, "billing_longitude": {"type": "integer", "index": 11, "name": "billing_longitude", "comment": null}, "billing_postal_code": {"type": "text", "index": 12, "name": "billing_postal_code", "comment": null}, "billing_state": {"type": "text", "index": 13, "name": "billing_state", "comment": null}, "billing_state_code": {"type": "integer", "index": 14, "name": "billing_state_code", "comment": null}, "billing_street": {"type": "text", "index": 15, "name": "billing_street", "comment": null}, "company_authorized_by_id": {"type": "integer", "index": 16, "name": "company_authorized_by_id", "comment": null}, "contract_id": {"type": "integer", "index": 17, "name": "contract_id", "comment": null}, "created_by_id": {"type": "text", "index": 18, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 19, "name": "created_date", "comment": null}, "customer_authorized_by_id": {"type": "integer", "index": 20, "name": "customer_authorized_by_id", "comment": null}, "description": {"type": "integer", "index": 21, "name": "description", "comment": null}, "effective_date": {"type": "timestamp without time zone", "index": 22, "name": "effective_date", "comment": null}, "end_date": {"type": "timestamp without time zone", "index": 23, "name": "end_date", "comment": null}, "is_deleted": {"type": "boolean", "index": 24, "name": "is_deleted", "comment": null}, "is_reduction_order": {"type": "boolean", "index": 25, "name": "is_reduction_order", "comment": null}, "last_modified_by_id": {"type": "text", "index": 26, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 27, "name": "last_modified_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 28, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 29, "name": "last_viewed_date", "comment": null}, "order_number": {"type": "integer", "index": 30, "name": "order_number", "comment": null}, "original_order_id": {"type": "integer", "index": 31, "name": "original_order_id", "comment": null}, "owner_id": {"type": "text", "index": 32, "name": "owner_id", "comment": null}, "pricebook_2_id": {"type": "text", "index": 33, "name": "pricebook_2_id", "comment": null}, "shipping_city": {"type": "text", "index": 34, "name": "shipping_city", "comment": null}, "shipping_country": {"type": "text", "index": 35, "name": "shipping_country", "comment": null}, "shipping_country_code": {"type": "integer", "index": 36, "name": "shipping_country_code", "comment": null}, "shipping_geocode_accuracy": {"type": "integer", "index": 37, "name": "shipping_geocode_accuracy", "comment": null}, "shipping_latitude": {"type": "integer", "index": 38, "name": "shipping_latitude", "comment": null}, "shipping_longitude": {"type": "integer", "index": 39, "name": "shipping_longitude", "comment": null}, "shipping_postal_code": {"type": "integer", "index": 40, "name": "shipping_postal_code", "comment": null}, "shipping_state": {"type": "text", "index": 41, "name": "shipping_state", "comment": null}, "shipping_state_code": {"type": "integer", "index": 42, "name": "shipping_state_code", "comment": null}, "shipping_street": {"type": "text", "index": 43, "name": "shipping_street", "comment": null}, "status": {"type": "text", "index": 44, "name": "status", "comment": null}, "status_code": {"type": "text", "index": 45, "name": "status_code", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 46, "name": "system_modstamp", "comment": null}, "total_amount": {"type": "double precision", "index": 47, "name": "total_amount", "comment": null}, "type": {"type": "text", "index": 48, "name": "type", "comment": null}, "netsuite_conn_celigo_update_c": {"type": "boolean", "index": 49, "name": "netsuite_conn_celigo_update_c", "comment": null}, "netsuite_conn_net_suite_id_c": {"type": "integer", "index": 50, "name": "netsuite_conn_net_suite_id_c", "comment": null}, "netsuite_conn_net_suite_sync_err_c": {"type": "integer", "index": 51, "name": "netsuite_conn_net_suite_sync_err_c", "comment": null}, "netsuite_conn_pushed_from_net_suite_c": {"type": "boolean", "index": 52, "name": "netsuite_conn_pushed_from_net_suite_c", "comment": null}, "netsuite_conn_opportunity_c": {"type": "integer", "index": 53, "name": "netsuite_conn_opportunity_c", "comment": null}, "netsuite_conn_net_suite_order_status_c": {"type": "text", "index": 54, "name": "netsuite_conn_net_suite_order_status_c", "comment": null}, "netsuite_conn_sync_in_progress_c": {"type": "boolean", "index": 55, "name": "netsuite_conn_sync_in_progress_c", "comment": null}, "netsuite_conn_tax_total_c": {"type": "integer", "index": 56, "name": "netsuite_conn_tax_total_c", "comment": null}, "netsuite_conn_tracking_numbers_c": {"type": "integer", "index": 57, "name": "netsuite_conn_tracking_numbers_c", "comment": null}, "netsuite_conn_push_to_net_suite_c": {"type": "boolean", "index": 58, "name": "netsuite_conn_push_to_net_suite_c", "comment": null}, "netsuite_conn_document_id_c": {"type": "integer", "index": 59, "name": "netsuite_conn_document_id_c", "comment": null}, "netsuite_conn_subtotal_c": {"type": "integer", "index": 60, "name": "netsuite_conn_subtotal_c", "comment": null}, "netsuite_conn_discount_total_c": {"type": "integer", "index": 61, "name": "netsuite_conn_discount_total_c", "comment": null}, "netsuite_conn_total_c": {"type": "integer", "index": 62, "name": "netsuite_conn_total_c", "comment": null}, "netsuite_conn_net_suite_order_date_c": {"type": "timestamp without time zone", "index": 63, "name": "netsuite_conn_net_suite_order_date_c", "comment": null}, "netsuite_conn_ship_date_c": {"type": "integer", "index": 64, "name": "netsuite_conn_ship_date_c", "comment": null}, "netsuite_conn_quote_c": {"type": "integer", "index": 65, "name": "netsuite_conn_quote_c", "comment": null}, "netsuite_conn_net_suite_order_number_c": {"type": "text", "index": 66, "name": "netsuite_conn_net_suite_order_number_c", "comment": null}, "sbqq_contracted_c": {"type": "boolean", "index": 67, "name": "sbqq_contracted_c", "comment": null}, "sbqq_contracting_method_c": {"type": "text", "index": 68, "name": "sbqq_contracting_method_c", "comment": null}, "sbqq_payment_term_c": {"type": "text", "index": 69, "name": "sbqq_payment_term_c", "comment": null}, "sbqq_price_calc_status_c": {"type": "text", "index": 70, "name": "sbqq_price_calc_status_c", "comment": null}, "sbqq_price_calc_status_message_c": {"type": "integer", "index": 71, "name": "sbqq_price_calc_status_message_c", "comment": null}, "sbqq_quote_c": {"type": "text", "index": 72, "name": "sbqq_quote_c", "comment": null}, "sbqq_renewal_term_c": {"type": "integer", "index": 73, "name": "sbqq_renewal_term_c", "comment": null}, "sbqq_renewal_uplift_rate_c": {"type": "integer", "index": 74, "name": "sbqq_renewal_uplift_rate_c", "comment": null}, "ava_sfcpq_ava_tax_message_c": {"type": "text", "index": 75, "name": "ava_sfcpq_ava_tax_message_c", "comment": null}, "ava_sfcpq_entity_use_code_c": {"type": "integer", "index": 76, "name": "ava_sfcpq_entity_use_code_c", "comment": null}, "ava_sfcpq_invoice_message_c": {"type": "integer", "index": 77, "name": "ava_sfcpq_invoice_message_c", "comment": null}, "ava_sfcpq_is_seller_importer_of_record_c": {"type": "boolean", "index": 78, "name": "ava_sfcpq_is_seller_importer_of_record_c", "comment": null}, "ava_sfcpq_order_calculate_tax_c": {"type": "boolean", "index": 79, "name": "ava_sfcpq_order_calculate_tax_c", "comment": null}, "ava_sfcpq_sales_tax_amount_c": {"type": "integer", "index": 80, "name": "ava_sfcpq_sales_tax_amount_c", "comment": null}, "blng_bill_now_c": {"type": "boolean", "index": 81, "name": "blng_bill_now_c", "comment": null}, "blng_billing_account_c": {"type": "text", "index": 82, "name": "blng_billing_account_c", "comment": null}, "blng_billing_day_of_month_c": {"type": "integer", "index": 83, "name": "blng_billing_day_of_month_c", "comment": null}, "blng_invoice_batch_c": {"type": "text", "index": 84, "name": "blng_invoice_batch_c", "comment": null}, "amendment_type_c": {"type": "integer", "index": 85, "name": "amendment_type_c", "comment": null}, "credit_summary_c": {"type": "text", "index": 86, "name": "credit_summary_c", "comment": null}, "evergreen_c": {"type": "boolean", "index": 87, "name": "evergreen_c", "comment": null}, "invoicing_type_c": {"type": "text", "index": 88, "name": "invoicing_type_c", "comment": null}, "legal_entity_c": {"type": "text", "index": 89, "name": "legal_entity_c", "comment": null}, "prepaid_billing_frequency_c": {"type": "text", "index": 90, "name": "prepaid_billing_frequency_c", "comment": null}, "prepaid_order_c": {"type": "boolean", "index": 91, "name": "prepaid_order_c", "comment": null}, "update_subscriptions_only_c": {"type": "boolean", "index": 92, "name": "update_subscriptions_only_c", "comment": null}, "order_auto_activated_c": {"type": "boolean", "index": 93, "name": "order_auto_activated_c", "comment": null}, "synced_to_net_suite_c": {"type": "boolean", "index": 94, "name": "synced_to_net_suite_c", "comment": null}, "purchase_order_number_c": {"type": "integer", "index": 95, "name": "purchase_order_number_c", "comment": null}, "celigo_sfnsio_discount_total_net_suite_c": {"type": "integer", "index": 96, "name": "celigo_sfnsio_discount_total_net_suite_c", "comment": null}, "celigo_sfnsio_net_suite_id_c": {"type": "integer", "index": 97, "name": "celigo_sfnsio_net_suite_id_c", "comment": null}, "celigo_sfnsio_net_suite_order_number_c": {"type": "text", "index": 98, "name": "celigo_sfnsio_net_suite_order_number_c", "comment": null}, "celigo_sfnsio_net_suite_order_status_c": {"type": "integer", "index": 99, "name": "celigo_sfnsio_net_suite_order_status_c", "comment": null}, "celigo_sfnsio_net_suite_record_c": {"type": "text", "index": 100, "name": "celigo_sfnsio_net_suite_record_c", "comment": null}, "celigo_sfnsio_ship_date_c": {"type": "integer", "index": 101, "name": "celigo_sfnsio_ship_date_c", "comment": null}, "celigo_sfnsio_skip_export_to_net_suite_c": {"type": "boolean", "index": 102, "name": "celigo_sfnsio_skip_export_to_net_suite_c", "comment": null}, "celigo_sfnsio_sub_total_net_suite_c": {"type": "integer", "index": 103, "name": "celigo_sfnsio_sub_total_net_suite_c", "comment": null}, "celigo_sfnsio_tax_total_net_suite_c": {"type": "integer", "index": 104, "name": "celigo_sfnsio_tax_total_net_suite_c", "comment": null}, "celigo_sfnsio_test_mode_record_c": {"type": "boolean", "index": 105, "name": "celigo_sfnsio_test_mode_record_c", "comment": null}, "celigo_sfnsio_total_net_suite_c": {"type": "integer", "index": 106, "name": "celigo_sfnsio_total_net_suite_c", "comment": null}, "amend_with_rollover_spend_type_c": {"type": "boolean", "index": 107, "name": "amend_with_rollover_spend_type_c", "comment": null}, "customer_spend_type_c": {"type": "integer", "index": 108, "name": "customer_spend_type_c", "comment": null}, "order_spend_type_c": {"type": "integer", "index": 109, "name": "order_spend_type_c", "comment": null}, "opportunity_id": {"type": "integer", "index": 110, "name": "opportunity_id", "comment": null}, "purchase_summary_c": {"type": "integer", "index": 111, "name": "purchase_summary_c", "comment": null}, "is_hvr_legacy_order_c": {"type": "integer", "index": 112, "name": "is_hvr_legacy_order_c", "comment": null}, "ironclad_workflow_c": {"type": "integer", "index": 113, "name": "ironclad_workflow_c", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 114, "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.salesforce_source_integration_tests.sf_order_data"}, "seed.salesforce_source_integration_tests.sf_product_2_data": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_product_2_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"last_referenced_date": {"type": "timestamp without time zone", "index": 1, "name": "last_referenced_date", "comment": null}, "is_active": {"type": "boolean", "index": 2, "name": "is_active", "comment": null}, "description": {"type": "integer", "index": 3, "name": "description", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 4, "name": "last_modified_date", "comment": null}, "record_type_id": {"type": "text", "index": 5, "name": "record_type_id", "comment": null}, "product_code": {"type": "integer", "index": 6, "name": "product_code", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 8, "name": "last_viewed_date", "comment": null}, "is_deleted": {"type": "boolean", "index": 9, "name": "is_deleted", "comment": null}, "last_modified_by_id": {"type": "text", "index": 10, "name": "last_modified_by_id", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 11, "name": "system_modstamp", "comment": null}, "name": {"type": "text", "index": 12, "name": "name", "comment": null}, "id": {"type": "text", "index": 13, "name": "id", "comment": null}, "created_by_id": {"type": "text", "index": 14, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 15, "name": "created_date", "comment": null}, "family": {"type": "text", "index": 16, "name": "family", "comment": null}, "max_volume_c": {"type": "integer", "index": 17, "name": "max_volume_c", "comment": null}, "min_volume_c": {"type": "integer", "index": 18, "name": "min_volume_c", "comment": null}, "request_name_c": {"type": "integer", "index": 19, "name": "request_name_c", "comment": null}, "default_quantity_c": {"type": "integer", "index": 20, "name": "default_quantity_c", "comment": null}, "account_c": {"type": "integer", "index": 21, "name": "account_c", "comment": null}, "related_product_c": {"type": "integer", "index": 22, "name": "related_product_c", "comment": null}, "picklist_value_c": {"type": "integer", "index": 23, "name": "picklist_value_c", "comment": null}, "as_input_c": {"type": "integer", "index": 24, "name": "as_input_c", "comment": null}, "as_output_c": {"type": "integer", "index": 25, "name": "as_output_c", "comment": null}, "status_c": {"type": "integer", "index": 26, "name": "status_c", "comment": null}, "number_of_quantity_installments": {"type": "integer", "index": 27, "name": "number_of_quantity_installments", "comment": null}, "number_of_revenue_installments": {"type": "integer", "index": 28, "name": "number_of_revenue_installments", "comment": null}, "quantity_installment_period": {"type": "integer", "index": 29, "name": "quantity_installment_period", "comment": null}, "quantity_schedule_type": {"type": "integer", "index": 30, "name": "quantity_schedule_type", "comment": null}, "revenue_installment_period": {"type": "integer", "index": 31, "name": "revenue_installment_period", "comment": null}, "revenue_schedule_type": {"type": "integer", "index": 32, "name": "revenue_schedule_type", "comment": null}, "connections_c": {"type": "integer", "index": 33, "name": "connections_c", "comment": null}, "event_volume_c": {"type": "integer", "index": 34, "name": "event_volume_c", "comment": null}, "roadmap_connections_c": {"type": "integer", "index": 35, "name": "roadmap_connections_c", "comment": null}, "row_volume_c": {"type": "integer", "index": 36, "name": "row_volume_c", "comment": null}, "display_url": {"type": "integer", "index": 37, "name": "display_url", "comment": null}, "external_data_source_id": {"type": "integer", "index": 38, "name": "external_data_source_id", "comment": null}, "external_id": {"type": "integer", "index": 39, "name": "external_id", "comment": null}, "quantity_unit_of_measure": {"type": "integer", "index": 40, "name": "quantity_unit_of_measure", "comment": null}, "stock_keeping_unit": {"type": "integer", "index": 41, "name": "stock_keeping_unit", "comment": null}, "features_c": {"type": "integer", "index": 42, "name": "features_c", "comment": null}, "tier_3_price_c": {"type": "integer", "index": 43, "name": "tier_3_price_c", "comment": null}, "tier_2_price_c": {"type": "integer", "index": 44, "name": "tier_2_price_c", "comment": null}, "tier_4_price_c": {"type": "integer", "index": 45, "name": "tier_4_price_c", "comment": null}, "tier_1_price_c": {"type": "integer", "index": 46, "name": "tier_1_price_c", "comment": null}, "netsuite_conn_sync_in_progress_c": {"type": "boolean", "index": 47, "name": "netsuite_conn_sync_in_progress_c", "comment": null}, "netsuite_conn_celigo_update_c": {"type": "boolean", "index": 48, "name": "netsuite_conn_celigo_update_c", "comment": null}, "netsuite_conn_term_contract_pricing_type_c": {"type": "integer", "index": 49, "name": "netsuite_conn_term_contract_pricing_type_c", "comment": null}, "netsuite_conn_net_suite_id_c": {"type": "integer", "index": 50, "name": "netsuite_conn_net_suite_id_c", "comment": null}, "netsuite_conn_net_suite_sync_err_c": {"type": "text", "index": 51, "name": "netsuite_conn_net_suite_sync_err_c", "comment": null}, "netsuite_conn_push_to_net_suite_c": {"type": "boolean", "index": 52, "name": "netsuite_conn_push_to_net_suite_c", "comment": null}, "netsuite_conn_item_category_c": {"type": "integer", "index": 53, "name": "netsuite_conn_item_category_c", "comment": null}, "netsuite_conn_net_suite_item_type_c": {"type": "text", "index": 54, "name": "netsuite_conn_net_suite_item_type_c", "comment": null}, "netsuite_conn_sub_type_c": {"type": "text", "index": 55, "name": "netsuite_conn_sub_type_c", "comment": null}, "is_new_c": {"type": "boolean", "index": 56, "name": "is_new_c", "comment": null}, "product_metadata_c": {"type": "integer", "index": 57, "name": "product_metadata_c", "comment": null}, "product_metadata_del_c": {"type": "integer", "index": 58, "name": "product_metadata_del_c", "comment": null}, "sbqq_asset_amendment_behavior_c": {"type": "text", "index": 59, "name": "sbqq_asset_amendment_behavior_c", "comment": null}, "sbqq_asset_conversion_c": {"type": "text", "index": 60, "name": "sbqq_asset_conversion_c", "comment": null}, "sbqq_batch_quantity_c": {"type": "integer", "index": 61, "name": "sbqq_batch_quantity_c", "comment": null}, "sbqq_billing_frequency_c": {"type": "text", "index": 62, "name": "sbqq_billing_frequency_c", "comment": null}, "sbqq_billing_type_c": {"type": "text", "index": 63, "name": "sbqq_billing_type_c", "comment": null}, "sbqq_block_pricing_field_c": {"type": "text", "index": 64, "name": "sbqq_block_pricing_field_c", "comment": null}, "sbqq_charge_type_c": {"type": "text", "index": 65, "name": "sbqq_charge_type_c", "comment": null}, "sbqq_component_c": {"type": "boolean", "index": 66, "name": "sbqq_component_c", "comment": null}, "sbqq_compound_discount_rate_c": {"type": "integer", "index": 67, "name": "sbqq_compound_discount_rate_c", "comment": null}, "sbqq_configuration_event_c": {"type": "integer", "index": 68, "name": "sbqq_configuration_event_c", "comment": null}, "sbqq_configuration_field_set_c": {"type": "integer", "index": 69, "name": "sbqq_configuration_field_set_c", "comment": null}, "sbqq_configuration_fields_c": {"type": "integer", "index": 70, "name": "sbqq_configuration_fields_c", "comment": null}, "sbqq_configuration_form_title_c": {"type": "integer", "index": 71, "name": "sbqq_configuration_form_title_c", "comment": null}, "sbqq_configuration_type_c": {"type": "integer", "index": 72, "name": "sbqq_configuration_type_c", "comment": null}, "sbqq_configuration_validator_c": {"type": "integer", "index": 73, "name": "sbqq_configuration_validator_c", "comment": null}, "sbqq_configured_code_pattern_c": {"type": "integer", "index": 74, "name": "sbqq_configured_code_pattern_c", "comment": null}, "sbqq_configured_description_pattern_c": {"type": "integer", "index": 75, "name": "sbqq_configured_description_pattern_c", "comment": null}, "sbqq_cost_editable_c": {"type": "boolean", "index": 76, "name": "sbqq_cost_editable_c", "comment": null}, "sbqq_cost_schedule_c": {"type": "integer", "index": 77, "name": "sbqq_cost_schedule_c", "comment": null}, "sbqq_custom_configuration_page_c": {"type": "integer", "index": 78, "name": "sbqq_custom_configuration_page_c", "comment": null}, "sbqq_custom_configuration_required_c": {"type": "boolean", "index": 79, "name": "sbqq_custom_configuration_required_c", "comment": null}, "sbqq_customer_community_availability_c": {"type": "integer", "index": 80, "name": "sbqq_customer_community_availability_c", "comment": null}, "sbqq_default_pricing_table_c": {"type": "integer", "index": 81, "name": "sbqq_default_pricing_table_c", "comment": null}, "sbqq_default_quantity_c": {"type": "integer", "index": 82, "name": "sbqq_default_quantity_c", "comment": null}, "sbqq_description_locked_c": {"type": "boolean", "index": 83, "name": "sbqq_description_locked_c", "comment": null}, "sbqq_discount_category_c": {"type": "integer", "index": 84, "name": "sbqq_discount_category_c", "comment": null}, "sbqq_discount_schedule_c": {"type": "integer", "index": 85, "name": "sbqq_discount_schedule_c", "comment": null}, "sbqq_dynamic_pricing_constraint_c": {"type": "integer", "index": 86, "name": "sbqq_dynamic_pricing_constraint_c", "comment": null}, "sbqq_exclude_from_maintenance_c": {"type": "boolean", "index": 87, "name": "sbqq_exclude_from_maintenance_c", "comment": null}, "sbqq_exclude_from_opportunity_c": {"type": "boolean", "index": 88, "name": "sbqq_exclude_from_opportunity_c", "comment": null}, "sbqq_externally_configurable_c": {"type": "boolean", "index": 89, "name": "sbqq_externally_configurable_c", "comment": null}, "sbqq_generate_contracted_price_c": {"type": "integer", "index": 90, "name": "sbqq_generate_contracted_price_c", "comment": null}, "sbqq_has_configuration_attributes_c": {"type": "boolean", "index": 91, "name": "sbqq_has_configuration_attributes_c", "comment": null}, "sbqq_has_consumption_schedule_c": {"type": "boolean", "index": 92, "name": "sbqq_has_consumption_schedule_c", "comment": null}, "sbqq_hidden_c": {"type": "boolean", "index": 93, "name": "sbqq_hidden_c", "comment": null}, "sbqq_hide_price_in_search_results_c": {"type": "boolean", "index": 94, "name": "sbqq_hide_price_in_search_results_c", "comment": null}, "sbqq_include_in_maintenance_c": {"type": "boolean", "index": 95, "name": "sbqq_include_in_maintenance_c", "comment": null}, "sbqq_new_quote_group_c": {"type": "boolean", "index": 96, "name": "sbqq_new_quote_group_c", "comment": null}, "sbqq_non_discountable_c": {"type": "boolean", "index": 97, "name": "sbqq_non_discountable_c", "comment": null}, "sbqq_non_partner_discountable_c": {"type": "boolean", "index": 98, "name": "sbqq_non_partner_discountable_c", "comment": null}, "sbqq_option_layout_c": {"type": "integer", "index": 99, "name": "sbqq_option_layout_c", "comment": null}, "sbqq_option_selection_method_c": {"type": "text", "index": 100, "name": "sbqq_option_selection_method_c", "comment": null}, "sbqq_optional_c": {"type": "boolean", "index": 101, "name": "sbqq_optional_c", "comment": null}, "sbqq_price_editable_c": {"type": "boolean", "index": 102, "name": "sbqq_price_editable_c", "comment": null}, "sbqq_pricing_method_c": {"type": "text", "index": 103, "name": "sbqq_pricing_method_c", "comment": null}, "sbqq_pricing_method_editable_c": {"type": "boolean", "index": 104, "name": "sbqq_pricing_method_editable_c", "comment": null}, "sbqq_product_picture_id_c": {"type": "integer", "index": 105, "name": "sbqq_product_picture_id_c", "comment": null}, "sbqq_quantity_editable_c": {"type": "boolean", "index": 106, "name": "sbqq_quantity_editable_c", "comment": null}, "sbqq_quantity_scale_c": {"type": "integer", "index": 107, "name": "sbqq_quantity_scale_c", "comment": null}, "sbqq_reconfiguration_disabled_c": {"type": "boolean", "index": 108, "name": "sbqq_reconfiguration_disabled_c", "comment": null}, "sbqq_renewal_product_c": {"type": "integer", "index": 109, "name": "sbqq_renewal_product_c", "comment": null}, "sbqq_sort_order_c": {"type": "integer", "index": 110, "name": "sbqq_sort_order_c", "comment": null}, "sbqq_specifications_c": {"type": "integer", "index": 111, "name": "sbqq_specifications_c", "comment": null}, "sbqq_subscription_base_c": {"type": "text", "index": 112, "name": "sbqq_subscription_base_c", "comment": null}, "sbqq_subscription_category_c": {"type": "integer", "index": 113, "name": "sbqq_subscription_category_c", "comment": null}, "sbqq_subscription_percent_c": {"type": "integer", "index": 114, "name": "sbqq_subscription_percent_c", "comment": null}, "sbqq_subscription_pricing_c": {"type": "text", "index": 115, "name": "sbqq_subscription_pricing_c", "comment": null}, "sbqq_subscription_target_c": {"type": "integer", "index": 116, "name": "sbqq_subscription_target_c", "comment": null}, "sbqq_subscription_term_c": {"type": "integer", "index": 117, "name": "sbqq_subscription_term_c", "comment": null}, "sbqq_subscription_type_c": {"type": "text", "index": 118, "name": "sbqq_subscription_type_c", "comment": null}, "sbqq_tax_code_c": {"type": "integer", "index": 119, "name": "sbqq_tax_code_c", "comment": null}, "sbqq_taxable_c": {"type": "boolean", "index": 120, "name": "sbqq_taxable_c", "comment": null}, "sbqq_term_discount_level_c": {"type": "integer", "index": 121, "name": "sbqq_term_discount_level_c", "comment": null}, "sbqq_term_discount_schedule_c": {"type": "integer", "index": 122, "name": "sbqq_term_discount_schedule_c", "comment": null}, "sbqq_upgrade_credit_c": {"type": "integer", "index": 123, "name": "sbqq_upgrade_credit_c", "comment": null}, "sbqq_upgrade_ratio_c": {"type": "integer", "index": 124, "name": "sbqq_upgrade_ratio_c", "comment": null}, "sbqq_upgrade_source_c": {"type": "integer", "index": 125, "name": "sbqq_upgrade_source_c", "comment": null}, "sbqq_upgrade_target_c": {"type": "integer", "index": 126, "name": "sbqq_upgrade_target_c", "comment": null}, "connector_type_c": {"type": "text", "index": 127, "name": "connector_type_c", "comment": null}, "pbf_pro_type_discount_c": {"type": "boolean", "index": 128, "name": "pbf_pro_type_discount_c", "comment": null}, "dimension_c": {"type": "text", "index": 129, "name": "dimension_c", "comment": null}, "connector_status_c": {"type": "text", "index": 130, "name": "connector_status_c", "comment": null}, "dimension_definition_c": {"type": "integer", "index": 131, "name": "dimension_definition_c", "comment": null}, "ava_sfcpq_tax_code_c": {"type": "integer", "index": 132, "name": "ava_sfcpq_tax_code_c", "comment": null}, "paid_consumption_c": {"type": "integer", "index": 133, "name": "paid_consumption_c", "comment": null}, "is_complimentary_c": {"type": "boolean", "index": 134, "name": "is_complimentary_c", "comment": null}, "product_external_id_c": {"type": "integer", "index": 135, "name": "product_external_id_c", "comment": null}, "blng_billing_rule_c": {"type": "text", "index": 136, "name": "blng_billing_rule_c", "comment": null}, "blng_revenue_recognition_rule_c": {"type": "text", "index": 137, "name": "blng_revenue_recognition_rule_c", "comment": null}, "blng_tax_rule_c": {"type": "text", "index": 138, "name": "blng_tax_rule_c", "comment": null}, "deployment_date_c": {"type": "integer", "index": 139, "name": "deployment_date_c", "comment": null}, "do_not_prorate_c": {"type": "boolean", "index": 140, "name": "do_not_prorate_c", "comment": null}, "celigo_sfnsio_netsuite_id_c": {"type": "integer", "index": 141, "name": "celigo_sfnsio_netsuite_id_c", "comment": null}, "sbqq_enable_large_configuration_c": {"type": "boolean", "index": 142, "name": "sbqq_enable_large_configuration_c", "comment": null}, "sbqq_pricing_guidance_c": {"type": "integer", "index": 143, "name": "sbqq_pricing_guidance_c", "comment": null}, "celigo_sfnsio_item_pricing_type_c": {"type": "integer", "index": 144, "name": "celigo_sfnsio_item_pricing_type_c", "comment": null}, "celigo_sfnsio_test_mode_record_c": {"type": "boolean", "index": 145, "name": "celigo_sfnsio_test_mode_record_c", "comment": null}, "celigo_sfnsio_celigo_last_modified_date_c": {"type": "timestamp without time zone", "index": 146, "name": "celigo_sfnsio_celigo_last_modified_date_c", "comment": null}, "celigo_sfnsio_net_suite_record_c": {"type": "integer", "index": 147, "name": "celigo_sfnsio_net_suite_record_c", "comment": null}, "celigo_sfnsio_skip_export_to_net_suite_c": {"type": "boolean", "index": 148, "name": "celigo_sfnsio_skip_export_to_net_suite_c", "comment": null}, "celigo_sfnsio_net_suite_item_type_c": {"type": "integer", "index": 149, "name": "celigo_sfnsio_net_suite_item_type_c", "comment": null}, "celigo_sfnsio_net_suite_id_c": {"type": "integer", "index": 150, "name": "celigo_sfnsio_net_suite_id_c", "comment": null}, "promo_code_c": {"type": "integer", "index": 151, "name": "promo_code_c", "comment": null}, "product_category_c": {"type": "integer", "index": 152, "name": "product_category_c", "comment": null}, "product_source_c": {"type": "integer", "index": 153, "name": "product_source_c", "comment": null}, "non_recurring_c": {"type": "boolean", "index": 154, "name": "non_recurring_c", "comment": null}, "is_archived": {"type": "boolean", "index": 155, "name": "is_archived", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 156, "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.salesforce_source_integration_tests.sf_product_2_data"}, "seed.salesforce_source_integration_tests.sf_task_data": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_task_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"referral_account_c": {"type": "integer", "index": 1, "name": "referral_account_c", "comment": null}, "who_id": {"type": "text", "index": 2, "name": "who_id", "comment": null}, "call_disposition": {"type": "integer", "index": 3, "name": "call_disposition", "comment": null}, "recurrence_day_of_month": {"type": "integer", "index": 4, "name": "recurrence_day_of_month", "comment": null}, "owner_id": {"type": "text", "index": 5, "name": "owner_id", "comment": null}, "recurrence_end_date_only": {"type": "timestamp without time zone", "index": 6, "name": "recurrence_end_date_only", "comment": null}, "subject": {"type": "text", "index": 7, "name": "subject", "comment": null}, "description": {"type": "text", "index": 8, "name": "description", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 9, "name": "last_modified_date", "comment": null}, "recurrence_time_zone_sid_key": {"type": "integer", "index": 10, "name": "recurrence_time_zone_sid_key", "comment": null}, "is_recurrence": {"type": "boolean", "index": 11, "name": "is_recurrence", "comment": null}, "what_count": {"type": "integer", "index": 12, "name": "what_count", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 13, "name": "_fivetran_synced", "comment": null}, "call_object": {"type": "integer", "index": 14, "name": "call_object", "comment": null}, "is_deleted": {"type": "boolean", "index": 15, "name": "is_deleted", "comment": null}, "recurrence_day_of_week_mask": {"type": "integer", "index": 16, "name": "recurrence_day_of_week_mask", "comment": null}, "last_modified_by_id": {"type": "text", "index": 17, "name": "last_modified_by_id", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 18, "name": "system_modstamp", "comment": null}, "recurrence_regenerated_type": {"type": "integer", "index": 19, "name": "recurrence_regenerated_type", "comment": null}, "id": {"type": "text", "index": 20, "name": "id", "comment": null}, "recurrence_type": {"type": "integer", "index": 21, "name": "recurrence_type", "comment": null}, "reminder_date_time": {"type": "timestamp without time zone", "index": 22, "name": "reminder_date_time", "comment": null}, "call_type": {"type": "integer", "index": 23, "name": "call_type", "comment": null}, "is_high_priority": {"type": "boolean", "index": 24, "name": "is_high_priority", "comment": null}, "is_closed": {"type": "boolean", "index": 25, "name": "is_closed", "comment": null}, "recurrence_month_of_year": {"type": "integer", "index": 26, "name": "recurrence_month_of_year", "comment": null}, "is_reminder_set": {"type": "boolean", "index": 27, "name": "is_reminder_set", "comment": null}, "activity_date": {"type": "timestamp without time zone", "index": 28, "name": "activity_date", "comment": null}, "recurrence_instance": {"type": "integer", "index": 29, "name": "recurrence_instance", "comment": null}, "priority": {"type": "text", "index": 30, "name": "priority", "comment": null}, "recurrence_interval": {"type": "integer", "index": 31, "name": "recurrence_interval", "comment": null}, "who_count": {"type": "integer", "index": 32, "name": "who_count", "comment": null}, "recurrence_start_date_only": {"type": "timestamp without time zone", "index": 33, "name": "recurrence_start_date_only", "comment": null}, "account_id": {"type": "text", "index": 34, "name": "account_id", "comment": null}, "referral_contact_c": {"type": "integer", "index": 35, "name": "referral_contact_c", "comment": null}, "call_duration_in_seconds": {"type": "integer", "index": 36, "name": "call_duration_in_seconds", "comment": null}, "created_by_id": {"type": "text", "index": 37, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 38, "name": "created_date", "comment": null}, "recurrence_activity_id": {"type": "integer", "index": 39, "name": "recurrence_activity_id", "comment": null}, "what_id": {"type": "text", "index": 40, "name": "what_id", "comment": null}, "task_subtype": {"type": "text", "index": 41, "name": "task_subtype", "comment": null}, "status": {"type": "text", "index": 42, "name": "status", "comment": null}, "invitee_uuid_c": {"type": "integer", "index": 43, "name": "invitee_uuid_c", "comment": null}, "type": {"type": "text", "index": 44, "name": "type", "comment": null}, "no_show_c": {"type": "boolean", "index": 45, "name": "no_show_c", "comment": null}, "first_meeting_held_c": {"type": "integer", "index": 46, "name": "first_meeting_held_c", "comment": null}, "associated_sdr_c": {"type": "integer", "index": 47, "name": "associated_sdr_c", "comment": null}, "first_meeting_c": {"type": "integer", "index": 48, "name": "first_meeting_c", "comment": null}, "call_recording_c": {"type": "integer", "index": 49, "name": "call_recording_c", "comment": null}, "affectlayer_chorus_call_id_c": {"type": "integer", "index": 50, "name": "affectlayer_chorus_call_id_c", "comment": null}, "affectlayer_affect_layer_call_id_c": {"type": "integer", "index": 51, "name": "affectlayer_affect_layer_call_id_c", "comment": null}, "last_rep_activity_date_c": {"type": "integer", "index": 52, "name": "last_rep_activity_date_c", "comment": null}, "lid_url_c": {"type": "integer", "index": 53, "name": "lid_url_c", "comment": null}, "lid_date_sent_c": {"type": "integer", "index": 54, "name": "lid_date_sent_c", "comment": null}, "record_type_id": {"type": "text", "index": 55, "name": "record_type_id", "comment": null}, "sales_loft_step_id_c": {"type": "integer", "index": 56, "name": "sales_loft_step_id_c", "comment": null}, "sales_loft_step_name_c": {"type": "integer", "index": 57, "name": "sales_loft_step_name_c", "comment": null}, "sales_loft_step_type_c": {"type": "integer", "index": 58, "name": "sales_loft_step_type_c", "comment": null}, "sales_loft_email_template_id_c": {"type": "integer", "index": 59, "name": "sales_loft_email_template_id_c", "comment": null}, "sales_loft_external_identifier_c": {"type": "integer", "index": 60, "name": "sales_loft_external_identifier_c", "comment": null}, "sales_loft_cadence_id_c": {"type": "integer", "index": 61, "name": "sales_loft_cadence_id_c", "comment": null}, "sales_loft_clicked_count_c": {"type": "integer", "index": 62, "name": "sales_loft_clicked_count_c", "comment": null}, "sales_loft_cadence_name_c": {"type": "integer", "index": 63, "name": "sales_loft_cadence_name_c", "comment": null}, "sales_loft_reply_count_c": {"type": "integer", "index": 64, "name": "sales_loft_reply_count_c", "comment": null}, "call_disposition_c": {"type": "integer", "index": 65, "name": "call_disposition_c", "comment": null}, "sales_loft_email_template_title_c": {"type": "integer", "index": 66, "name": "sales_loft_email_template_title_c", "comment": null}, "sales_loft_step_day_new_c": {"type": "integer", "index": 67, "name": "sales_loft_step_day_new_c", "comment": null}, "call_disposition_2_c": {"type": "integer", "index": 68, "name": "call_disposition_2_c", "comment": null}, "sales_loft_viewed_count_c": {"type": "integer", "index": 69, "name": "sales_loft_viewed_count_c", "comment": null}, "sales_loft_1_sales_loft_step_day_c": {"type": "integer", "index": 70, "name": "sales_loft_1_sales_loft_step_day_c", "comment": null}, "sales_loft_1_sales_loft_clicked_count_c": {"type": "integer", "index": 71, "name": "sales_loft_1_sales_loft_clicked_count_c", "comment": null}, "sales_loft_1_sales_loft_view_count_c": {"type": "integer", "index": 72, "name": "sales_loft_1_sales_loft_view_count_c", "comment": null}, "sales_loft_1_call_disposition_c": {"type": "integer", "index": 73, "name": "sales_loft_1_call_disposition_c", "comment": null}, "sales_loft_1_sales_loft_replies_count_c": {"type": "integer", "index": 74, "name": "sales_loft_1_sales_loft_replies_count_c", "comment": null}, "sales_loft_1_sales_loft_cadence_name_c": {"type": "integer", "index": 75, "name": "sales_loft_1_sales_loft_cadence_name_c", "comment": null}, "sales_loft_1_call_sentiment_c": {"type": "integer", "index": 76, "name": "sales_loft_1_call_sentiment_c", "comment": null}, "sales_loft_1_sales_loft_email_template_title_c": {"type": "integer", "index": 77, "name": "sales_loft_1_sales_loft_email_template_title_c", "comment": null}, "completed_date_time": {"type": "timestamp without time zone", "index": 78, "name": "completed_date_time", "comment": null}, "is_a_co_sell_activity_c": {"type": "integer", "index": 79, "name": "is_a_co_sell_activity_c", "comment": null}, "partner_contact_c": {"type": "integer", "index": 80, "name": "partner_contact_c", "comment": null}, "co_selling_activity_c": {"type": "integer", "index": 81, "name": "co_selling_activity_c", "comment": null}, "description_c": {"type": "integer", "index": 82, "name": "description_c", "comment": null}, "co_sell_partner_account_c": {"type": "integer", "index": 83, "name": "co_sell_partner_account_c", "comment": null}, "campaign_c": {"type": "integer", "index": 84, "name": "campaign_c", "comment": null}, "partner_account_c": {"type": "integer", "index": 85, "name": "partner_account_c", "comment": null}, "topic_c": {"type": "integer", "index": 86, "name": "topic_c", "comment": null}, "event_name_c": {"type": "integer", "index": 87, "name": "event_name_c", "comment": null}, "attendance_number_c": {"type": "integer", "index": 88, "name": "attendance_number_c", "comment": null}, "partner_activity_type_c": {"type": "integer", "index": 89, "name": "partner_activity_type_c", "comment": null}, "proof_of_referral_c": {"type": "integer", "index": 90, "name": "proof_of_referral_c", "comment": null}, "how_did_you_bring_value_or_create_trust_c": {"type": "integer", "index": 91, "name": "how_did_you_bring_value_or_create_trust_c", "comment": null}, "how_did_you_bring_value_or_earn_trust_c": {"type": "integer", "index": 92, "name": "how_did_you_bring_value_or_earn_trust_c", "comment": null}, "duration_in_minutes_c": {"type": "integer", "index": 93, "name": "duration_in_minutes_c", "comment": null}, "vidyard_c": {"type": "boolean", "index": 94, "name": "vidyard_c", "comment": null}, "expected_payment_date_c": {"type": "integer", "index": 95, "name": "expected_payment_date_c", "comment": null}, "execute_collections_plan_activity_c": {"type": "boolean", "index": 96, "name": "execute_collections_plan_activity_c", "comment": null}, "collections_hold_c": {"type": "boolean", "index": 97, "name": "collections_hold_c", "comment": null}, "opportunity_c": {"type": "integer", "index": 98, "name": "opportunity_c", "comment": null}, "meeting_type_c": {"type": "text", "index": 99, "name": "meeting_type_c", "comment": null}, "meeting_name_c": {"type": "text", "index": 100, "name": "meeting_name_c", "comment": null}, "bizible_2_bizible_id_c": {"type": "integer", "index": 101, "name": "bizible_2_bizible_id_c", "comment": null}, "bizible_2_bizible_touchpoint_date_c": {"type": "integer", "index": 102, "name": "bizible_2_bizible_touchpoint_date_c", "comment": null}, "assigned_to_role_c": {"type": "text", "index": 103, "name": "assigned_to_role_c", "comment": null}, "assigned_to_name_c": {"type": "text", "index": 104, "name": "assigned_to_name_c", "comment": null}, "legacy_hvr_id_c": {"type": "integer", "index": 105, "name": "legacy_hvr_id_c", "comment": null}, "is_archived": {"type": "boolean", "index": 106, "name": "is_archived", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 107, "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.salesforce_source_integration_tests.sf_task_data"}, "seed.salesforce_source_integration_tests.sf_user_data": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_user_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}, "about_me": {"type": "integer", "index": 3, "name": "about_me", "comment": null}, "account_id": {"type": "integer", "index": 4, "name": "account_id", "comment": null}, "alias": {"type": "text", "index": 5, "name": "alias", "comment": null}, "badge_text": {"type": "text", "index": 6, "name": "badge_text", "comment": null}, "banner_photo_url": {"type": "text", "index": 7, "name": "banner_photo_url", "comment": null}, "call_center_id": {"type": "integer", "index": 8, "name": "call_center_id", "comment": null}, "city": {"type": "integer", "index": 9, "name": "city", "comment": null}, "community_nickname": {"type": "text", "index": 10, "name": "community_nickname", "comment": null}, "company_name": {"type": "integer", "index": 11, "name": "company_name", "comment": null}, "contact_id": {"type": "integer", "index": 12, "name": "contact_id", "comment": null}, "country": {"type": "text", "index": 13, "name": "country", "comment": null}, "country_code": {"type": "text", "index": 14, "name": "country_code", "comment": null}, "default_group_notification_frequency": {"type": "text", "index": 15, "name": "default_group_notification_frequency", "comment": null}, "delegated_approver_id": {"type": "text", "index": 16, "name": "delegated_approver_id", "comment": null}, "department": {"type": "integer", "index": 17, "name": "department", "comment": null}, "digest_frequency": {"type": "text", "index": 18, "name": "digest_frequency", "comment": null}, "division": {"type": "integer", "index": 19, "name": "division", "comment": null}, "email": {"type": "text", "index": 20, "name": "email", "comment": null}, "email_encoding_key": {"type": "text", "index": 21, "name": "email_encoding_key", "comment": null}, "email_preferences_auto_bcc": {"type": "boolean", "index": 22, "name": "email_preferences_auto_bcc", "comment": null}, "employee_number": {"type": "integer", "index": 23, "name": "employee_number", "comment": null}, "extension": {"type": "integer", "index": 24, "name": "extension", "comment": null}, "fax": {"type": "integer", "index": 25, "name": "fax", "comment": null}, "federation_identifier": {"type": "integer", "index": 26, "name": "federation_identifier", "comment": null}, "first_name": {"type": "text", "index": 27, "name": "first_name", "comment": null}, "forecast_enabled": {"type": "boolean", "index": 28, "name": "forecast_enabled", "comment": null}, "full_photo_url": {"type": "text", "index": 29, "name": "full_photo_url", "comment": null}, "geocode_accuracy": {"type": "integer", "index": 30, "name": "geocode_accuracy", "comment": null}, "id": {"type": "text", "index": 31, "name": "id", "comment": null}, "individual_id": {"type": "integer", "index": 32, "name": "individual_id", "comment": null}, "is_active": {"type": "boolean", "index": 33, "name": "is_active", "comment": null}, "is_profile_photo_active": {"type": "boolean", "index": 34, "name": "is_profile_photo_active", "comment": null}, "language_locale_key": {"type": "text", "index": 35, "name": "language_locale_key", "comment": null}, "last_login_date": {"type": "timestamp without time zone", "index": 36, "name": "last_login_date", "comment": null}, "last_name": {"type": "text", "index": 37, "name": "last_name", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 38, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 39, "name": "last_viewed_date", "comment": null}, "latitude": {"type": "double precision", "index": 40, "name": "latitude", "comment": null}, "locale_sid_key": {"type": "text", "index": 41, "name": "locale_sid_key", "comment": null}, "longitude": {"type": "double precision", "index": 42, "name": "longitude", "comment": null}, "manager_id": {"type": "text", "index": 43, "name": "manager_id", "comment": null}, "medium_banner_photo_url": {"type": "text", "index": 44, "name": "medium_banner_photo_url", "comment": null}, "mobile_phone": {"type": "integer", "index": 45, "name": "mobile_phone", "comment": null}, "name": {"type": "text", "index": 46, "name": "name", "comment": null}, "offline_trial_expiration_date": {"type": "timestamp without time zone", "index": 47, "name": "offline_trial_expiration_date", "comment": null}, "phone": {"type": "text", "index": 48, "name": "phone", "comment": null}, "postal_code": {"type": "integer", "index": 49, "name": "postal_code", "comment": null}, "profile_id": {"type": "text", "index": 50, "name": "profile_id", "comment": null}, "receives_admin_info_emails": {"type": "boolean", "index": 51, "name": "receives_admin_info_emails", "comment": null}, "receives_info_emails": {"type": "boolean", "index": 52, "name": "receives_info_emails", "comment": null}, "sender_email": {"type": "integer", "index": 53, "name": "sender_email", "comment": null}, "sender_name": {"type": "integer", "index": 54, "name": "sender_name", "comment": null}, "signature": {"type": "integer", "index": 55, "name": "signature", "comment": null}, "small_banner_photo_url": {"type": "text", "index": 56, "name": "small_banner_photo_url", "comment": null}, "small_photo_url": {"type": "text", "index": 57, "name": "small_photo_url", "comment": null}, "state": {"type": "integer", "index": 58, "name": "state", "comment": null}, "state_code": {"type": "integer", "index": 59, "name": "state_code", "comment": null}, "street": {"type": "integer", "index": 60, "name": "street", "comment": null}, "time_zone_sid_key": {"type": "text", "index": 61, "name": "time_zone_sid_key", "comment": null}, "title": {"type": "text", "index": 62, "name": "title", "comment": null}, "user_role_id": {"type": "text", "index": 63, "name": "user_role_id", "comment": null}, "user_type": {"type": "text", "index": 64, "name": "user_type", "comment": null}, "username": {"type": "text", "index": 65, "name": "username", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 66, "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.salesforce_source_integration_tests.sf_user_data"}, "seed.salesforce_source_integration_tests.sf_user_role_data": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_user_role_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}, "case_access_for_account_owner": {"type": "text", "index": 3, "name": "case_access_for_account_owner", "comment": null}, "contact_access_for_account_owner": {"type": "text", "index": 4, "name": "contact_access_for_account_owner", "comment": null}, "developer_name": {"type": "text", "index": 5, "name": "developer_name", "comment": null}, "forecast_user_id": {"type": "integer", "index": 6, "name": "forecast_user_id", "comment": null}, "id": {"type": "text", "index": 7, "name": "id", "comment": null}, "may_forecast_manager_share": {"type": "boolean", "index": 8, "name": "may_forecast_manager_share", "comment": null}, "name": {"type": "text", "index": 9, "name": "name", "comment": null}, "opportunity_access_for_account_owner": {"type": "text", "index": 10, "name": "opportunity_access_for_account_owner", "comment": null}, "parent_role_id": {"type": "text", "index": 11, "name": "parent_role_id", "comment": null}, "portal_type": {"type": "text", "index": 12, "name": "portal_type", "comment": null}, "rollup_description": {"type": "text", "index": 13, "name": "rollup_description", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 14, "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.salesforce_source_integration_tests.sf_user_role_data"}, "model.salesforce_source.stg_salesforce__account": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__account", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_number": {"type": "text", "index": 2, "name": "account_number", "comment": null}, "account_source": {"type": "text", "index": 3, "name": "account_source", "comment": null}, "annual_revenue": {"type": "numeric(28,6)", "index": 4, "name": "annual_revenue", "comment": null}, "billing_city": {"type": "text", "index": 5, "name": "billing_city", "comment": null}, "billing_country": {"type": "text", "index": 6, "name": "billing_country", "comment": null}, "billing_postal_code": {"type": "text", "index": 7, "name": "billing_postal_code", "comment": null}, "billing_state": {"type": "text", "index": 8, "name": "billing_state", "comment": null}, "billing_state_code": {"type": "text", "index": 9, "name": "billing_state_code", "comment": null}, "billing_street": {"type": "text", "index": 10, "name": "billing_street", "comment": null}, "account_description": {"type": "text", "index": 11, "name": "account_description", "comment": null}, "account_id": {"type": "text", "index": 12, "name": "account_id", "comment": null}, "industry": {"type": "text", "index": 13, "name": "industry", "comment": null}, "is_deleted": {"type": "boolean", "index": 14, "name": "is_deleted", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 15, "name": "last_activity_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 16, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 17, "name": "last_viewed_date", "comment": null}, "master_record_id": {"type": "text", "index": 18, "name": "master_record_id", "comment": null}, "account_name": {"type": "text", "index": 19, "name": "account_name", "comment": null}, "number_of_employees": {"type": "integer", "index": 20, "name": "number_of_employees", "comment": null}, "owner_id": {"type": "text", "index": 21, "name": "owner_id", "comment": null}, "ownership": {"type": "text", "index": 22, "name": "ownership", "comment": null}, "parent_id": {"type": "text", "index": 23, "name": "parent_id", "comment": null}, "rating": {"type": "text", "index": 24, "name": "rating", "comment": null}, "record_type_id": {"type": "text", "index": 25, "name": "record_type_id", "comment": null}, "shipping_city": {"type": "text", "index": 26, "name": "shipping_city", "comment": null}, "shipping_country": {"type": "text", "index": 27, "name": "shipping_country", "comment": null}, "shipping_country_code": {"type": "text", "index": 28, "name": "shipping_country_code", "comment": null}, "shipping_postal_code": {"type": "text", "index": 29, "name": "shipping_postal_code", "comment": null}, "shipping_state": {"type": "text", "index": 30, "name": "shipping_state", "comment": null}, "shipping_state_code": {"type": "text", "index": 31, "name": "shipping_state_code", "comment": null}, "shipping_street": {"type": "text", "index": 32, "name": "shipping_street", "comment": null}, "type": {"type": "text", "index": 33, "name": "type", "comment": null}, "website": {"type": "text", "index": 34, "name": "website", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.salesforce_source.stg_salesforce__account"}, "model.salesforce_source.stg_salesforce__contact": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__contact", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "department": {"type": "text", "index": 3, "name": "department", "comment": null}, "contact_description": {"type": "text", "index": 4, "name": "contact_description", "comment": null}, "email": {"type": "text", "index": 5, "name": "email", "comment": null}, "first_name": {"type": "text", "index": 6, "name": "first_name", "comment": null}, "home_phone": {"type": "text", "index": 7, "name": "home_phone", "comment": null}, "contact_id": {"type": "text", "index": 8, "name": "contact_id", "comment": null}, "individual_id": {"type": "text", "index": 9, "name": "individual_id", "comment": null}, "is_deleted": {"type": "boolean", "index": 10, "name": "is_deleted", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 11, "name": "last_activity_date", "comment": null}, "last_modified_by_id": {"type": "text", "index": 12, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 13, "name": "last_modified_date", "comment": null}, "last_name": {"type": "text", "index": 14, "name": "last_name", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 15, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 16, "name": "last_viewed_date", "comment": null}, "lead_source": {"type": "text", "index": 17, "name": "lead_source", "comment": null}, "mailing_city": {"type": "text", "index": 18, "name": "mailing_city", "comment": null}, "mailing_country": {"type": "text", "index": 19, "name": "mailing_country", "comment": null}, "mailing_country_code": {"type": "text", "index": 20, "name": "mailing_country_code", "comment": null}, "mailing_postal_code": {"type": "text", "index": 21, "name": "mailing_postal_code", "comment": null}, "mailing_state": {"type": "text", "index": 22, "name": "mailing_state", "comment": null}, "mailing_state_code": {"type": "text", "index": 23, "name": "mailing_state_code", "comment": null}, "mailing_street": {"type": "text", "index": 24, "name": "mailing_street", "comment": null}, "master_record_id": {"type": "text", "index": 25, "name": "master_record_id", "comment": null}, "mobile_phone": {"type": "text", "index": 26, "name": "mobile_phone", "comment": null}, "contact_name": {"type": "text", "index": 27, "name": "contact_name", "comment": null}, "owner_id": {"type": "text", "index": 28, "name": "owner_id", "comment": null}, "phone": {"type": "text", "index": 29, "name": "phone", "comment": null}, "reports_to_id": {"type": "text", "index": 30, "name": "reports_to_id", "comment": null}, "title": {"type": "text", "index": 31, "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.salesforce_source.stg_salesforce__contact"}, "model.salesforce_source.stg_salesforce__event": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__event", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "activity_date": {"type": "timestamp without time zone", "index": 3, "name": "activity_date", "comment": null}, "activity_date_time": {"type": "timestamp without time zone", "index": 4, "name": "activity_date_time", "comment": null}, "created_by_id": {"type": "text", "index": 5, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 6, "name": "created_date", "comment": null}, "event_description": {"type": "text", "index": 7, "name": "event_description", "comment": null}, "end_date": {"type": "timestamp without time zone", "index": 8, "name": "end_date", "comment": null}, "end_date_time": {"type": "timestamp without time zone", "index": 9, "name": "end_date_time", "comment": null}, "event_subtype": {"type": "text", "index": 10, "name": "event_subtype", "comment": null}, "group_event_type": {"type": "text", "index": 11, "name": "group_event_type", "comment": null}, "event_id": {"type": "text", "index": 12, "name": "event_id", "comment": null}, "is_archived": {"type": "boolean", "index": 13, "name": "is_archived", "comment": null}, "is_child": {"type": "boolean", "index": 14, "name": "is_child", "comment": null}, "is_deleted": {"type": "boolean", "index": 15, "name": "is_deleted", "comment": null}, "is_group_event": {"type": "boolean", "index": 16, "name": "is_group_event", "comment": null}, "is_recurrence": {"type": "boolean", "index": 17, "name": "is_recurrence", "comment": null}, "last_modified_by_id": {"type": "text", "index": 18, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 19, "name": "last_modified_date", "comment": null}, "location": {"type": "text", "index": 20, "name": "location", "comment": null}, "owner_id": {"type": "text", "index": 21, "name": "owner_id", "comment": null}, "start_date_time": {"type": "timestamp without time zone", "index": 22, "name": "start_date_time", "comment": null}, "subject": {"type": "text", "index": 23, "name": "subject", "comment": null}, "type": {"type": "text", "index": 24, "name": "type", "comment": null}, "what_count": {"type": "integer", "index": 25, "name": "what_count", "comment": null}, "what_id": {"type": "text", "index": 26, "name": "what_id", "comment": null}, "who_count": {"type": "integer", "index": 27, "name": "who_count", "comment": null}, "who_id": {"type": "text", "index": 28, "name": "who_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.salesforce_source.stg_salesforce__event"}, "model.salesforce_source.stg_salesforce__lead": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__lead", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "annual_revenue": {"type": "double precision", "index": 2, "name": "annual_revenue", "comment": null}, "city": {"type": "text", "index": 3, "name": "city", "comment": null}, "company": {"type": "text", "index": 4, "name": "company", "comment": null}, "converted_account_id": {"type": "text", "index": 5, "name": "converted_account_id", "comment": null}, "converted_contact_id": {"type": "text", "index": 6, "name": "converted_contact_id", "comment": null}, "converted_date": {"type": "timestamp without time zone", "index": 7, "name": "converted_date", "comment": null}, "converted_opportunity_id": {"type": "text", "index": 8, "name": "converted_opportunity_id", "comment": null}, "country": {"type": "text", "index": 9, "name": "country", "comment": null}, "country_code": {"type": "text", "index": 10, "name": "country_code", "comment": null}, "created_by_id": {"type": "text", "index": 11, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 12, "name": "created_date", "comment": null}, "lead_description": {"type": "text", "index": 13, "name": "lead_description", "comment": null}, "email": {"type": "text", "index": 14, "name": "email", "comment": null}, "email_bounced_date": {"type": "timestamp without time zone", "index": 15, "name": "email_bounced_date", "comment": null}, "email_bounced_reason": {"type": "text", "index": 16, "name": "email_bounced_reason", "comment": null}, "first_name": {"type": "text", "index": 17, "name": "first_name", "comment": null}, "has_opted_out_of_email": {"type": "boolean", "index": 18, "name": "has_opted_out_of_email", "comment": null}, "lead_id": {"type": "text", "index": 19, "name": "lead_id", "comment": null}, "individual_id": {"type": "text", "index": 20, "name": "individual_id", "comment": null}, "industry": {"type": "text", "index": 21, "name": "industry", "comment": null}, "is_converted": {"type": "boolean", "index": 22, "name": "is_converted", "comment": null}, "is_deleted": {"type": "boolean", "index": 23, "name": "is_deleted", "comment": null}, "is_unread_by_owner": {"type": "boolean", "index": 24, "name": "is_unread_by_owner", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 25, "name": "last_activity_date", "comment": null}, "last_modified_by_id": {"type": "text", "index": 26, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 27, "name": "last_modified_date", "comment": null}, "last_name": {"type": "text", "index": 28, "name": "last_name", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 29, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 30, "name": "last_viewed_date", "comment": null}, "lead_source": {"type": "text", "index": 31, "name": "lead_source", "comment": null}, "master_record_id": {"type": "text", "index": 32, "name": "master_record_id", "comment": null}, "mobile_phone": {"type": "text", "index": 33, "name": "mobile_phone", "comment": null}, "lead_name": {"type": "text", "index": 34, "name": "lead_name", "comment": null}, "number_of_employees": {"type": "integer", "index": 35, "name": "number_of_employees", "comment": null}, "owner_id": {"type": "text", "index": 36, "name": "owner_id", "comment": null}, "phone": {"type": "text", "index": 37, "name": "phone", "comment": null}, "postal_code": {"type": "text", "index": 38, "name": "postal_code", "comment": null}, "state": {"type": "text", "index": 39, "name": "state", "comment": null}, "state_code": {"type": "text", "index": 40, "name": "state_code", "comment": null}, "status": {"type": "text", "index": 41, "name": "status", "comment": null}, "street": {"type": "text", "index": 42, "name": "street", "comment": null}, "title": {"type": "text", "index": 43, "name": "title", "comment": null}, "website": {"type": "text", "index": 44, "name": "website", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.salesforce_source.stg_salesforce__lead"}, "model.salesforce_source.stg_salesforce__opportunity": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__opportunity", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "amount": {"type": "numeric(28,6)", "index": 3, "name": "amount", "comment": null}, "campaign_id": {"type": "text", "index": 4, "name": "campaign_id", "comment": null}, "close_date": {"type": "timestamp without time zone", "index": 5, "name": "close_date", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 6, "name": "created_date", "comment": null}, "opportunity_description": {"type": "text", "index": 7, "name": "opportunity_description", "comment": null}, "expected_revenue": {"type": "numeric(28,6)", "index": 8, "name": "expected_revenue", "comment": null}, "fiscal": {"type": "text", "index": 9, "name": "fiscal", "comment": null}, "fiscal_quarter": {"type": "integer", "index": 10, "name": "fiscal_quarter", "comment": null}, "fiscal_year": {"type": "integer", "index": 11, "name": "fiscal_year", "comment": null}, "forecast_category": {"type": "text", "index": 12, "name": "forecast_category", "comment": null}, "forecast_category_name": {"type": "text", "index": 13, "name": "forecast_category_name", "comment": null}, "has_open_activity": {"type": "boolean", "index": 14, "name": "has_open_activity", "comment": null}, "has_opportunity_line_item": {"type": "boolean", "index": 15, "name": "has_opportunity_line_item", "comment": null}, "has_overdue_task": {"type": "boolean", "index": 16, "name": "has_overdue_task", "comment": null}, "opportunity_id": {"type": "text", "index": 17, "name": "opportunity_id", "comment": null}, "is_closed": {"type": "boolean", "index": 18, "name": "is_closed", "comment": null}, "is_deleted": {"type": "boolean", "index": 19, "name": "is_deleted", "comment": null}, "is_won": {"type": "boolean", "index": 20, "name": "is_won", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 21, "name": "last_activity_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 22, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 23, "name": "last_viewed_date", "comment": null}, "lead_source": {"type": "text", "index": 24, "name": "lead_source", "comment": null}, "opportunity_name": {"type": "text", "index": 25, "name": "opportunity_name", "comment": null}, "next_step": {"type": "text", "index": 26, "name": "next_step", "comment": null}, "owner_id": {"type": "text", "index": 27, "name": "owner_id", "comment": null}, "probability": {"type": "double precision", "index": 28, "name": "probability", "comment": null}, "record_type_id": {"type": "text", "index": 29, "name": "record_type_id", "comment": null}, "stage_name": {"type": "text", "index": 30, "name": "stage_name", "comment": null}, "synced_quote_id": {"type": "text", "index": 31, "name": "synced_quote_id", "comment": null}, "type": {"type": "text", "index": 32, "name": "type", "comment": null}, "is_created_this_month": {"type": "boolean", "index": 33, "name": "is_created_this_month", "comment": null}, "is_created_this_quarter": {"type": "boolean", "index": 34, "name": "is_created_this_quarter", "comment": null}, "days_since_created": {"type": "integer", "index": 35, "name": "days_since_created", "comment": null}, "days_to_close": {"type": "integer", "index": 36, "name": "days_to_close", "comment": null}, "is_closed_this_month": {"type": "boolean", "index": 37, "name": "is_closed_this_month", "comment": null}, "is_closed_this_quarter": {"type": "boolean", "index": 38, "name": "is_closed_this_quarter", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.salesforce_source.stg_salesforce__opportunity"}, "model.salesforce_source.stg_salesforce__opportunity_line_item": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__opportunity_line_item", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "created_by_id": {"type": "text", "index": 2, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 3, "name": "created_date", "comment": null}, "opportunity_line_item_description": {"type": "text", "index": 4, "name": "opportunity_line_item_description", "comment": null}, "discount": {"type": "double precision", "index": 5, "name": "discount", "comment": null}, "has_quantity_schedule": {"type": "boolean", "index": 6, "name": "has_quantity_schedule", "comment": null}, "has_revenue_schedule": {"type": "boolean", "index": 7, "name": "has_revenue_schedule", "comment": null}, "has_schedule": {"type": "boolean", "index": 8, "name": "has_schedule", "comment": null}, "opportunity_line_item_id": {"type": "text", "index": 9, "name": "opportunity_line_item_id", "comment": null}, "is_deleted": {"type": "boolean", "index": 10, "name": "is_deleted", "comment": null}, "last_modified_by_id": {"type": "text", "index": 11, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 12, "name": "last_modified_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 13, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 14, "name": "last_viewed_date", "comment": null}, "list_price": {"type": "double precision", "index": 15, "name": "list_price", "comment": null}, "opportunity_line_item_name": {"type": "text", "index": 16, "name": "opportunity_line_item_name", "comment": null}, "opportunity_id": {"type": "text", "index": 17, "name": "opportunity_id", "comment": null}, "pricebook_entry_id": {"type": "text", "index": 18, "name": "pricebook_entry_id", "comment": null}, "product_2_id": {"type": "text", "index": 19, "name": "product_2_id", "comment": null}, "product_code": {"type": "text", "index": 20, "name": "product_code", "comment": null}, "quantity": {"type": "double precision", "index": 21, "name": "quantity", "comment": null}, "service_date": {"type": "timestamp without time zone", "index": 22, "name": "service_date", "comment": null}, "sort_order": {"type": "integer", "index": 23, "name": "sort_order", "comment": null}, "total_price": {"type": "double precision", "index": 24, "name": "total_price", "comment": null}, "unit_price": {"type": "double precision", "index": 25, "name": "unit_price", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.salesforce_source.stg_salesforce__opportunity_line_item"}, "model.salesforce_source.stg_salesforce__order": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__order", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "activated_by_id": {"type": "text", "index": 3, "name": "activated_by_id", "comment": null}, "activated_date": {"type": "timestamp without time zone", "index": 4, "name": "activated_date", "comment": null}, "billing_city": {"type": "text", "index": 5, "name": "billing_city", "comment": null}, "billing_country": {"type": "text", "index": 6, "name": "billing_country", "comment": null}, "billing_country_code": {"type": "text", "index": 7, "name": "billing_country_code", "comment": null}, "billing_postal_code": {"type": "text", "index": 8, "name": "billing_postal_code", "comment": null}, "billing_state": {"type": "text", "index": 9, "name": "billing_state", "comment": null}, "billing_state_code": {"type": "text", "index": 10, "name": "billing_state_code", "comment": null}, "billing_street": {"type": "text", "index": 11, "name": "billing_street", "comment": null}, "contract_id": {"type": "text", "index": 12, "name": "contract_id", "comment": null}, "created_by_id": {"type": "text", "index": 13, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 14, "name": "created_date", "comment": null}, "order_description": {"type": "text", "index": 15, "name": "order_description", "comment": null}, "end_date": {"type": "timestamp without time zone", "index": 16, "name": "end_date", "comment": null}, "order_id": {"type": "text", "index": 17, "name": "order_id", "comment": null}, "is_deleted": {"type": "boolean", "index": 18, "name": "is_deleted", "comment": null}, "last_modified_by_id": {"type": "text", "index": 19, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 20, "name": "last_modified_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 21, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 22, "name": "last_viewed_date", "comment": null}, "opportunity_id": {"type": "text", "index": 23, "name": "opportunity_id", "comment": null}, "order_number": {"type": "text", "index": 24, "name": "order_number", "comment": null}, "original_order_id": {"type": "text", "index": 25, "name": "original_order_id", "comment": null}, "owner_id": {"type": "text", "index": 26, "name": "owner_id", "comment": null}, "pricebook_2_id": {"type": "text", "index": 27, "name": "pricebook_2_id", "comment": null}, "shipping_city": {"type": "text", "index": 28, "name": "shipping_city", "comment": null}, "shipping_country": {"type": "text", "index": 29, "name": "shipping_country", "comment": null}, "shipping_country_code": {"type": "text", "index": 30, "name": "shipping_country_code", "comment": null}, "shipping_postal_code": {"type": "text", "index": 31, "name": "shipping_postal_code", "comment": null}, "shipping_state": {"type": "text", "index": 32, "name": "shipping_state", "comment": null}, "shipping_state_code": {"type": "text", "index": 33, "name": "shipping_state_code", "comment": null}, "shipping_street": {"type": "text", "index": 34, "name": "shipping_street", "comment": null}, "status": {"type": "text", "index": 35, "name": "status", "comment": null}, "total_amount": {"type": "double precision", "index": 36, "name": "total_amount", "comment": null}, "type": {"type": "text", "index": 37, "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.salesforce_source.stg_salesforce__order"}, "model.salesforce_source.stg_salesforce__product_2": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__product_2", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "created_by_id": {"type": "text", "index": 2, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 3, "name": "created_date", "comment": null}, "product_2_description": {"type": "text", "index": 4, "name": "product_2_description", "comment": null}, "display_url": {"type": "text", "index": 5, "name": "display_url", "comment": null}, "external_id": {"type": "text", "index": 6, "name": "external_id", "comment": null}, "family": {"type": "text", "index": 7, "name": "family", "comment": null}, "product_2_id": {"type": "text", "index": 8, "name": "product_2_id", "comment": null}, "is_active": {"type": "boolean", "index": 9, "name": "is_active", "comment": null}, "is_archived": {"type": "boolean", "index": 10, "name": "is_archived", "comment": null}, "is_deleted": {"type": "boolean", "index": 11, "name": "is_deleted", "comment": null}, "last_modified_by_id": {"type": "text", "index": 12, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 13, "name": "last_modified_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 14, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 15, "name": "last_viewed_date", "comment": null}, "product_2_name": {"type": "text", "index": 16, "name": "product_2_name", "comment": null}, "number_of_quantity_installments": {"type": "integer", "index": 17, "name": "number_of_quantity_installments", "comment": null}, "number_of_revenue_installments": {"type": "integer", "index": 18, "name": "number_of_revenue_installments", "comment": null}, "product_code": {"type": "text", "index": 19, "name": "product_code", "comment": null}, "quantity_installment_period": {"type": "text", "index": 20, "name": "quantity_installment_period", "comment": null}, "quantity_schedule_type": {"type": "text", "index": 21, "name": "quantity_schedule_type", "comment": null}, "quantity_unit_of_measure": {"type": "text", "index": 22, "name": "quantity_unit_of_measure", "comment": null}, "record_type_id": {"type": "text", "index": 23, "name": "record_type_id", "comment": null}, "revenue_installment_period": {"type": "text", "index": 24, "name": "revenue_installment_period", "comment": null}, "revenue_schedule_type": {"type": "text", "index": 25, "name": "revenue_schedule_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.salesforce_source.stg_salesforce__product_2"}, "model.salesforce_source.stg_salesforce__task": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__task", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "activity_date": {"type": "timestamp without time zone", "index": 3, "name": "activity_date", "comment": null}, "call_disposition": {"type": "text", "index": 4, "name": "call_disposition", "comment": null}, "call_duration_in_seconds": {"type": "integer", "index": 5, "name": "call_duration_in_seconds", "comment": null}, "call_object": {"type": "text", "index": 6, "name": "call_object", "comment": null}, "call_type": {"type": "text", "index": 7, "name": "call_type", "comment": null}, "completed_date_time": {"type": "timestamp without time zone", "index": 8, "name": "completed_date_time", "comment": null}, "created_by_id": {"type": "text", "index": 9, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 10, "name": "created_date", "comment": null}, "task_description": {"type": "text", "index": 11, "name": "task_description", "comment": null}, "task_id": {"type": "text", "index": 12, "name": "task_id", "comment": null}, "is_archived": {"type": "boolean", "index": 13, "name": "is_archived", "comment": null}, "is_closed": {"type": "boolean", "index": 14, "name": "is_closed", "comment": null}, "is_deleted": {"type": "boolean", "index": 15, "name": "is_deleted", "comment": null}, "is_high_priority": {"type": "boolean", "index": 16, "name": "is_high_priority", "comment": null}, "last_modified_by_id": {"type": "text", "index": 17, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 18, "name": "last_modified_date", "comment": null}, "owner_id": {"type": "text", "index": 19, "name": "owner_id", "comment": null}, "priority": {"type": "text", "index": 20, "name": "priority", "comment": null}, "record_type_id": {"type": "text", "index": 21, "name": "record_type_id", "comment": null}, "status": {"type": "text", "index": 22, "name": "status", "comment": null}, "subject": {"type": "text", "index": 23, "name": "subject", "comment": null}, "task_subtype": {"type": "text", "index": 24, "name": "task_subtype", "comment": null}, "type": {"type": "text", "index": 25, "name": "type", "comment": null}, "what_count": {"type": "integer", "index": 26, "name": "what_count", "comment": null}, "what_id": {"type": "text", "index": 27, "name": "what_id", "comment": null}, "who_count": {"type": "integer", "index": 28, "name": "who_count", "comment": null}, "who_id": {"type": "text", "index": 29, "name": "who_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.salesforce_source.stg_salesforce__task"}, "model.salesforce_source.stg_salesforce__user": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__user", "database": "postgres", "comment": null, "owner": "pguser"}, "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}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "alias": {"type": "text", "index": 4, "name": "alias", "comment": null}, "city": {"type": "text", "index": 5, "name": "city", "comment": null}, "company_name": {"type": "text", "index": 6, "name": "company_name", "comment": null}, "contact_id": {"type": "text", "index": 7, "name": "contact_id", "comment": null}, "country": {"type": "text", "index": 8, "name": "country", "comment": null}, "country_code": {"type": "text", "index": 9, "name": "country_code", "comment": null}, "department": {"type": "text", "index": 10, "name": "department", "comment": null}, "email": {"type": "text", "index": 11, "name": "email", "comment": null}, "first_name": {"type": "text", "index": 12, "name": "first_name", "comment": null}, "user_id": {"type": "text", "index": 13, "name": "user_id", "comment": null}, "individual_id": {"type": "text", "index": 14, "name": "individual_id", "comment": null}, "is_active": {"type": "boolean", "index": 15, "name": "is_active", "comment": null}, "last_login_date": {"type": "timestamp without time zone", "index": 16, "name": "last_login_date", "comment": null}, "last_name": {"type": "text", "index": 17, "name": "last_name", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 18, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 19, "name": "last_viewed_date", "comment": null}, "manager_id": {"type": "text", "index": 20, "name": "manager_id", "comment": null}, "user_name": {"type": "text", "index": 21, "name": "user_name", "comment": null}, "postal_code": {"type": "text", "index": 22, "name": "postal_code", "comment": null}, "profile_id": {"type": "text", "index": 23, "name": "profile_id", "comment": null}, "state": {"type": "text", "index": 24, "name": "state", "comment": null}, "state_code": {"type": "text", "index": 25, "name": "state_code", "comment": null}, "street": {"type": "text", "index": 26, "name": "street", "comment": null}, "title": {"type": "text", "index": 27, "name": "title", "comment": null}, "user_role_id": {"type": "text", "index": 28, "name": "user_role_id", "comment": null}, "user_type": {"type": "text", "index": 29, "name": "user_type", "comment": null}, "username": {"type": "text", "index": 30, "name": "username", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.salesforce_source.stg_salesforce__user"}, "model.salesforce_source.stg_salesforce__user_role": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__user_role", "database": "postgres", "comment": null, "owner": "pguser"}, "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}, "developer_name": {"type": "text", "index": 3, "name": "developer_name", "comment": null}, "user_role_id": {"type": "text", "index": 4, "name": "user_role_id", "comment": null}, "user_role_name": {"type": "text", "index": 5, "name": "user_role_name", "comment": null}, "opportunity_access_for_account_owner": {"type": "text", "index": 6, "name": "opportunity_access_for_account_owner", "comment": null}, "parent_role_id": {"type": "text", "index": 7, "name": "parent_role_id", "comment": null}, "rollup_description": {"type": "text", "index": 8, "name": "rollup_description", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.salesforce_source.stg_salesforce__user_role"}}, "sources": {"source.salesforce_source.salesforce.account": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_account_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_number": {"type": "integer", "index": 2, "name": "account_number", "comment": null}, "account_source": {"type": "text", "index": 3, "name": "account_source", "comment": null}, "annual_revenue": {"type": "double precision", "index": 4, "name": "annual_revenue", "comment": null}, "billing_city": {"type": "text", "index": 5, "name": "billing_city", "comment": null}, "billing_country": {"type": "text", "index": 6, "name": "billing_country", "comment": null}, "billing_country_code": {"type": "text", "index": 7, "name": "billing_country_code", "comment": null}, "billing_geocode_accuracy": {"type": "integer", "index": 8, "name": "billing_geocode_accuracy", "comment": null}, "billing_latitude": {"type": "double precision", "index": 9, "name": "billing_latitude", "comment": null}, "billing_longitude": {"type": "double precision", "index": 10, "name": "billing_longitude", "comment": null}, "billing_postal_code": {"type": "text", "index": 11, "name": "billing_postal_code", "comment": null}, "billing_state": {"type": "text", "index": 12, "name": "billing_state", "comment": null}, "billing_state_code": {"type": "text", "index": 13, "name": "billing_state_code", "comment": null}, "billing_street": {"type": "text", "index": 14, "name": "billing_street", "comment": null}, "description": {"type": "text", "index": 15, "name": "description", "comment": null}, "fax": {"type": "integer", "index": 16, "name": "fax", "comment": null}, "id": {"type": "text", "index": 17, "name": "id", "comment": null}, "industry": {"type": "text", "index": 18, "name": "industry", "comment": null}, "is_deleted": {"type": "boolean", "index": 19, "name": "is_deleted", "comment": null}, "jigsaw_company_id": {"type": "integer", "index": 20, "name": "jigsaw_company_id", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 21, "name": "last_activity_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 22, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 23, "name": "last_viewed_date", "comment": null}, "master_record_id": {"type": "text", "index": 24, "name": "master_record_id", "comment": null}, "name": {"type": "text", "index": 25, "name": "name", "comment": null}, "number_of_employees": {"type": "integer", "index": 26, "name": "number_of_employees", "comment": null}, "owner_id": {"type": "text", "index": 27, "name": "owner_id", "comment": null}, "ownership": {"type": "integer", "index": 28, "name": "ownership", "comment": null}, "parent_id": {"type": "integer", "index": 29, "name": "parent_id", "comment": null}, "phone": {"type": "text", "index": 30, "name": "phone", "comment": null}, "photo_url": {"type": "text", "index": 31, "name": "photo_url", "comment": null}, "rating": {"type": "integer", "index": 32, "name": "rating", "comment": null}, "record_type_id": {"type": "text", "index": 33, "name": "record_type_id", "comment": null}, "shipping_city": {"type": "integer", "index": 34, "name": "shipping_city", "comment": null}, "shipping_country": {"type": "text", "index": 35, "name": "shipping_country", "comment": null}, "shipping_country_code": {"type": "text", "index": 36, "name": "shipping_country_code", "comment": null}, "shipping_geocode_accuracy": {"type": "integer", "index": 37, "name": "shipping_geocode_accuracy", "comment": null}, "shipping_latitude": {"type": "double precision", "index": 38, "name": "shipping_latitude", "comment": null}, "shipping_longitude": {"type": "double precision", "index": 39, "name": "shipping_longitude", "comment": null}, "shipping_postal_code": {"type": "integer", "index": 40, "name": "shipping_postal_code", "comment": null}, "shipping_state": {"type": "integer", "index": 41, "name": "shipping_state", "comment": null}, "shipping_state_code": {"type": "integer", "index": 42, "name": "shipping_state_code", "comment": null}, "shipping_street": {"type": "integer", "index": 43, "name": "shipping_street", "comment": null}, "sic": {"type": "integer", "index": 44, "name": "sic", "comment": null}, "sic_desc": {"type": "integer", "index": 45, "name": "sic_desc", "comment": null}, "site": {"type": "integer", "index": 46, "name": "site", "comment": null}, "ticker_symbol": {"type": "integer", "index": 47, "name": "ticker_symbol", "comment": null}, "type": {"type": "text", "index": 48, "name": "type", "comment": null}, "website": {"type": "text", "index": 49, "name": "website", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 50, "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.salesforce_source.salesforce.account"}, "source.salesforce_source.salesforce.contact": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_contact_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "cbit_clearbit_c": {"type": "text", "index": 4, "name": "cbit_clearbit_c", "comment": null}, "cbit_clearbit_ready_c": {"type": "boolean", "index": 5, "name": "cbit_clearbit_ready_c", "comment": null}, "created_by_id": {"type": "text", "index": 6, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 7, "name": "created_date", "comment": null}, "department": {"type": "integer", "index": 8, "name": "department", "comment": null}, "email": {"type": "text", "index": 9, "name": "email", "comment": null}, "email_bounced_date": {"type": "timestamp without time zone", "index": 10, "name": "email_bounced_date", "comment": null}, "email_bounced_reason": {"type": "integer", "index": 11, "name": "email_bounced_reason", "comment": null}, "fax": {"type": "integer", "index": 12, "name": "fax", "comment": null}, "first_name": {"type": "text", "index": 13, "name": "first_name", "comment": null}, "is_deleted": {"type": "boolean", "index": 14, "name": "is_deleted", "comment": null}, "is_email_bounced": {"type": "boolean", "index": 15, "name": "is_email_bounced", "comment": null}, "jigsaw_contact_id": {"type": "integer", "index": 16, "name": "jigsaw_contact_id", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 17, "name": "last_activity_date", "comment": null}, "last_curequest_date": {"type": "timestamp without time zone", "index": 18, "name": "last_curequest_date", "comment": null}, "last_cuupdate_date": {"type": "timestamp without time zone", "index": 19, "name": "last_cuupdate_date", "comment": null}, "last_modified_by_id": {"type": "text", "index": 20, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 21, "name": "last_modified_date", "comment": null}, "last_name": {"type": "text", "index": 22, "name": "last_name", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 23, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 24, "name": "last_viewed_date", "comment": null}, "mailing_city": {"type": "text", "index": 25, "name": "mailing_city", "comment": null}, "mailing_country": {"type": "text", "index": 26, "name": "mailing_country", "comment": null}, "mailing_country_code": {"type": "text", "index": 27, "name": "mailing_country_code", "comment": null}, "mailing_geocode_accuracy": {"type": "integer", "index": 28, "name": "mailing_geocode_accuracy", "comment": null}, "mailing_latitude": {"type": "integer", "index": 29, "name": "mailing_latitude", "comment": null}, "mailing_longitude": {"type": "integer", "index": 30, "name": "mailing_longitude", "comment": null}, "mailing_postal_code": {"type": "integer", "index": 31, "name": "mailing_postal_code", "comment": null}, "mailing_state": {"type": "text", "index": 32, "name": "mailing_state", "comment": null}, "mailing_state_code": {"type": "text", "index": 33, "name": "mailing_state_code", "comment": null}, "mailing_street": {"type": "text", "index": 34, "name": "mailing_street", "comment": null}, "master_record_id": {"type": "integer", "index": 35, "name": "master_record_id", "comment": null}, "mc_4_sf_mc_subscriber_c": {"type": "integer", "index": 36, "name": "mc_4_sf_mc_subscriber_c", "comment": null}, "mobile_phone": {"type": "integer", "index": 37, "name": "mobile_phone", "comment": null}, "name": {"type": "text", "index": 38, "name": "name", "comment": null}, "owner_id": {"type": "text", "index": 39, "name": "owner_id", "comment": null}, "phone": {"type": "text", "index": 40, "name": "phone", "comment": null}, "photo_url": {"type": "text", "index": 41, "name": "photo_url", "comment": null}, "reports_to_id": {"type": "integer", "index": 42, "name": "reports_to_id", "comment": null}, "salutation": {"type": "integer", "index": 43, "name": "salutation", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 44, "name": "system_modstamp", "comment": null}, "title": {"type": "text", "index": 45, "name": "title", "comment": null}, "email_bounced_c": {"type": "boolean", "index": 46, "name": "email_bounced_c", "comment": null}, "email_quality_unknown_c": {"type": "boolean", "index": 47, "name": "email_quality_unknown_c", "comment": null}, "gclid_c": {"type": "integer", "index": 48, "name": "gclid_c", "comment": null}, "referral_account_c": {"type": "integer", "index": 49, "name": "referral_account_c", "comment": null}, "referral_contact_c": {"type": "integer", "index": 50, "name": "referral_contact_c", "comment": null}, "has_opted_out_of_email": {"type": "boolean", "index": 51, "name": "has_opted_out_of_email", "comment": null}, "act_on_lead_score_c": {"type": "integer", "index": 52, "name": "act_on_lead_score_c", "comment": null}, "cbit_created_by_clearbit_c": {"type": "boolean", "index": 53, "name": "cbit_created_by_clearbit_c", "comment": null}, "fivetran_user_id_c": {"type": "integer", "index": 54, "name": "fivetran_user_id_c", "comment": null}, "no_longer_at_company_c": {"type": "boolean", "index": 55, "name": "no_longer_at_company_c", "comment": null}, "pi_campaign_c": {"type": "text", "index": 56, "name": "pi_campaign_c", "comment": null}, "pi_comments_c": {"type": "integer", "index": 57, "name": "pi_comments_c", "comment": null}, "pi_conversion_date_c": {"type": "integer", "index": 58, "name": "pi_conversion_date_c", "comment": null}, "pi_conversion_object_name_c": {"type": "integer", "index": 59, "name": "pi_conversion_object_name_c", "comment": null}, "pi_conversion_object_type_c": {"type": "integer", "index": 60, "name": "pi_conversion_object_type_c", "comment": null}, "pi_created_date_c": {"type": "timestamp without time zone", "index": 61, "name": "pi_created_date_c", "comment": null}, "pi_first_activity_c": {"type": "integer", "index": 62, "name": "pi_first_activity_c", "comment": null}, "pi_first_search_term_c": {"type": "integer", "index": 63, "name": "pi_first_search_term_c", "comment": null}, "pi_first_search_type_c": {"type": "integer", "index": 64, "name": "pi_first_search_type_c", "comment": null}, "pi_first_touch_url_c": {"type": "integer", "index": 65, "name": "pi_first_touch_url_c", "comment": null}, "pi_grade_c": {"type": "integer", "index": 66, "name": "pi_grade_c", "comment": null}, "pi_last_activity_c": {"type": "integer", "index": 67, "name": "pi_last_activity_c", "comment": null}, "pi_needs_score_synced_c": {"type": "boolean", "index": 68, "name": "pi_needs_score_synced_c", "comment": null}, "pi_notes_c": {"type": "integer", "index": 69, "name": "pi_notes_c", "comment": null}, "pi_pardot_hard_bounced_c": {"type": "boolean", "index": 70, "name": "pi_pardot_hard_bounced_c", "comment": null}, "pi_pardot_last_scored_at_c": {"type": "integer", "index": 71, "name": "pi_pardot_last_scored_at_c", "comment": null}, "pi_score_c": {"type": "integer", "index": 72, "name": "pi_score_c", "comment": null}, "pi_url_c": {"type": "text", "index": 73, "name": "pi_url_c", "comment": null}, "pi_utm_campaign_c": {"type": "integer", "index": 74, "name": "pi_utm_campaign_c", "comment": null}, "pi_utm_content_c": {"type": "integer", "index": 75, "name": "pi_utm_content_c", "comment": null}, "pi_utm_medium_c": {"type": "integer", "index": 76, "name": "pi_utm_medium_c", "comment": null}, "pi_utm_source_c": {"type": "integer", "index": 77, "name": "pi_utm_source_c", "comment": null}, "pi_utm_term_c": {"type": "integer", "index": 78, "name": "pi_utm_term_c", "comment": null}, "lead_source": {"type": "text", "index": 79, "name": "lead_source", "comment": null}, "contact_status_c": {"type": "text", "index": 80, "name": "contact_status_c", "comment": null}, "region_c": {"type": "integer", "index": 81, "name": "region_c", "comment": null}, "competitor_c": {"type": "integer", "index": 82, "name": "competitor_c", "comment": null}, "bt_stripe_gender_c": {"type": "integer", "index": 83, "name": "bt_stripe_gender_c", "comment": null}, "bt_stripe_ssn_last_4_encrypted_c": {"type": "integer", "index": 84, "name": "bt_stripe_ssn_last_4_encrypted_c", "comment": null}, "bt_stripe_personal_id_number_c": {"type": "integer", "index": 85, "name": "bt_stripe_personal_id_number_c", "comment": null}, "bt_stripe_personal_id_number_encrypted_c": {"type": "integer", "index": 86, "name": "bt_stripe_personal_id_number_encrypted_c", "comment": null}, "bt_stripe_maiden_name_c": {"type": "integer", "index": 87, "name": "bt_stripe_maiden_name_c", "comment": null}, "bt_stripe_languages_c": {"type": "integer", "index": 88, "name": "bt_stripe_languages_c", "comment": null}, "bt_stripe_default_payment_method_c": {"type": "integer", "index": 89, "name": "bt_stripe_default_payment_method_c", "comment": null}, "bt_stripe_ssn_last_4_c": {"type": "integer", "index": 90, "name": "bt_stripe_ssn_last_4_c", "comment": null}, "bt_stripe_personal_id_type_c": {"type": "integer", "index": 91, "name": "bt_stripe_personal_id_type_c", "comment": null}, "bt_stripe_default_payment_gateway_c": {"type": "integer", "index": 92, "name": "bt_stripe_default_payment_gateway_c", "comment": null}, "bt_stripe_level_c": {"type": "integer", "index": 93, "name": "bt_stripe_level_c", "comment": null}, "lean_data_routing_action_c": {"type": "text", "index": 94, "name": "lean_data_routing_action_c", "comment": null}, "lean_data_matched_buyer_persona_c": {"type": "integer", "index": 95, "name": "lean_data_matched_buyer_persona_c", "comment": null}, "lean_data_ld_segment_c": {"type": "integer", "index": 96, "name": "lean_data_ld_segment_c", "comment": null}, "lean_data_tag_c": {"type": "integer", "index": 97, "name": "lean_data_tag_c", "comment": null}, "lean_data_modified_score_c": {"type": "integer", "index": 98, "name": "lean_data_modified_score_c", "comment": null}, "do_not_route_lead_c": {"type": "boolean", "index": 99, "name": "do_not_route_lead_c", "comment": null}, "technical_contact_c": {"type": "integer", "index": 100, "name": "technical_contact_c", "comment": null}, "allbound_id_c": {"type": "integer", "index": 101, "name": "allbound_id_c", "comment": null}, "notes_c": {"type": "integer", "index": 102, "name": "notes_c", "comment": null}, "netsuite_conn_sync_in_progress_c": {"type": "boolean", "index": 103, "name": "netsuite_conn_sync_in_progress_c", "comment": null}, "netsuite_conn_celigo_update_c": {"type": "boolean", "index": 104, "name": "netsuite_conn_celigo_update_c", "comment": null}, "netsuite_conn_net_suite_id_c": {"type": "integer", "index": 105, "name": "netsuite_conn_net_suite_id_c", "comment": null}, "netsuite_conn_net_suite_sync_err_c": {"type": "integer", "index": 106, "name": "netsuite_conn_net_suite_sync_err_c", "comment": null}, "netsuite_conn_push_to_net_suite_c": {"type": "boolean", "index": 107, "name": "netsuite_conn_push_to_net_suite_c", "comment": null}, "netsuite_conn_pushed_from_opportunity_c": {"type": "boolean", "index": 108, "name": "netsuite_conn_pushed_from_opportunity_c", "comment": null}, "description": {"type": "text", "index": 109, "name": "description", "comment": null}, "lid_linked_in_company_id_c": {"type": "integer", "index": 110, "name": "lid_linked_in_company_id_c", "comment": null}, "lid_linked_in_member_token_c": {"type": "integer", "index": 111, "name": "lid_linked_in_member_token_c", "comment": null}, "is_eu_resident_c": {"type": "boolean", "index": 112, "name": "is_eu_resident_c", "comment": null}, "do_not_call": {"type": "boolean", "index": 113, "name": "do_not_call", "comment": null}, "sales_loft_1_most_recent_cadence_next_step_due_date_c": {"type": "integer", "index": 114, "name": "sales_loft_1_most_recent_cadence_next_step_due_date_c", "comment": null}, "sales_loft_1_most_recent_last_completed_step_c": {"type": "integer", "index": 115, "name": "sales_loft_1_most_recent_last_completed_step_c", "comment": null}, "sales_loft_1_most_recent_cadence_name_c": {"type": "integer", "index": 116, "name": "sales_loft_1_most_recent_cadence_name_c", "comment": null}, "source_detail_c": {"type": "text", "index": 117, "name": "source_detail_c", "comment": null}, "utm_source_c": {"type": "integer", "index": 118, "name": "utm_source_c", "comment": null}, "utm_content_c": {"type": "integer", "index": 119, "name": "utm_content_c", "comment": null}, "utm_term_c": {"type": "integer", "index": 120, "name": "utm_term_c", "comment": null}, "utm_medium_c": {"type": "integer", "index": 121, "name": "utm_medium_c", "comment": null}, "utm_campaign_c": {"type": "integer", "index": 122, "name": "utm_campaign_c", "comment": null}, "network_c": {"type": "integer", "index": 123, "name": "network_c", "comment": null}, "matchtype_c": {"type": "integer", "index": 124, "name": "matchtype_c", "comment": null}, "device_c": {"type": "integer", "index": 125, "name": "device_c", "comment": null}, "creative_c": {"type": "integer", "index": 126, "name": "creative_c", "comment": null}, "adgroupid_c": {"type": "integer", "index": 127, "name": "adgroupid_c", "comment": null}, "keyword_c": {"type": "integer", "index": 128, "name": "keyword_c", "comment": null}, "campaignid_c": {"type": "integer", "index": 129, "name": "campaignid_c", "comment": null}, "partner_rep_email_c": {"type": "integer", "index": 130, "name": "partner_rep_email_c", "comment": null}, "partner_rep_name_c": {"type": "integer", "index": 131, "name": "partner_rep_name_c", "comment": null}, "contact_type_c": {"type": "integer", "index": 132, "name": "contact_type_c", "comment": null}, "old_lead_source_c": {"type": "integer", "index": 133, "name": "old_lead_source_c", "comment": null}, "old_lead_source_detail_c": {"type": "integer", "index": 134, "name": "old_lead_source_detail_c", "comment": null}, "contact_stage_c": {"type": "integer", "index": 135, "name": "contact_stage_c", "comment": null}, "original_utm_campaign_c": {"type": "integer", "index": 136, "name": "original_utm_campaign_c", "comment": null}, "original_utm_content_c": {"type": "integer", "index": 137, "name": "original_utm_content_c", "comment": null}, "original_utm_medium_c": {"type": "integer", "index": 138, "name": "original_utm_medium_c", "comment": null}, "original_utm_source_c": {"type": "integer", "index": 139, "name": "original_utm_source_c", "comment": null}, "original_utm_term_c": {"type": "integer", "index": 140, "name": "original_utm_term_c", "comment": null}, "es_app_escreated_timestamp_c": {"type": "integer", "index": 141, "name": "es_app_escreated_timestamp_c", "comment": null}, "es_app_esecid_c": {"type": "integer", "index": 142, "name": "es_app_esecid_c", "comment": null}, "es_app_esenriched_c": {"type": "integer", "index": 143, "name": "es_app_esenriched_c", "comment": null}, "es_app_esenriched_timestamp_c": {"type": "integer", "index": 144, "name": "es_app_esenriched_timestamp_c", "comment": null}, "es_app_esintent_aggregate_score_c": {"type": "integer", "index": 145, "name": "es_app_esintent_aggregate_score_c", "comment": null}, "es_app_esintent_timestamp_c": {"type": "integer", "index": 146, "name": "es_app_esintent_timestamp_c", "comment": null}, "es_app_esintent_topics_c": {"type": "integer", "index": 147, "name": "es_app_esintent_topics_c", "comment": null}, "es_app_esoverall_fit_score_c": {"type": "integer", "index": 148, "name": "es_app_esoverall_fit_score_c", "comment": null}, "es_app_essource_c": {"type": "integer", "index": 149, "name": "es_app_essource_c", "comment": null}, "individual_id": {"type": "integer", "index": 150, "name": "individual_id", "comment": null}, "marketing_process_c": {"type": "integer", "index": 151, "name": "marketing_process_c", "comment": null}, "automation_tracking_c": {"type": "integer", "index": 152, "name": "automation_tracking_c", "comment": null}, "user_gems_has_changed_job_c": {"type": "integer", "index": 153, "name": "user_gems_has_changed_job_c", "comment": null}, "email_opt_in_explicit_c": {"type": "integer", "index": 154, "name": "email_opt_in_explicit_c", "comment": null}, "email_opt_in_implicit_c": {"type": "integer", "index": 155, "name": "email_opt_in_implicit_c", "comment": null}, "gdpr_opt_in_explicit_c": {"type": "integer", "index": 156, "name": "gdpr_opt_in_explicit_c", "comment": null}, "user_gems_is_a_user_gem_c": {"type": "integer", "index": 157, "name": "user_gems_is_a_user_gem_c", "comment": null}, "user_gems_past_account_c": {"type": "integer", "index": 158, "name": "user_gems_past_account_c", "comment": null}, "user_gems_past_company_c": {"type": "integer", "index": 159, "name": "user_gems_past_company_c", "comment": null}, "user_gems_past_contact_c": {"type": "integer", "index": 160, "name": "user_gems_past_contact_c", "comment": null}, "user_gems_past_title_c": {"type": "integer", "index": 161, "name": "user_gems_past_title_c", "comment": null}, "partner_contact_c": {"type": "integer", "index": 162, "name": "partner_contact_c", "comment": null}, "promotion_id_c": {"type": "integer", "index": 163, "name": "promotion_id_c", "comment": null}, "referral_exists_c": {"type": "integer", "index": 164, "name": "referral_exists_c", "comment": null}, "referral_first_name_c": {"type": "integer", "index": 165, "name": "referral_first_name_c", "comment": null}, "referral_last_name_c": {"type": "integer", "index": 166, "name": "referral_last_name_c", "comment": null}, "mkto_71_contact_acquisition_date_c": {"type": "integer", "index": 167, "name": "mkto_71_contact_acquisition_date_c", "comment": null}, "mkto_71_contact_acquisition_program_c": {"type": "integer", "index": 168, "name": "mkto_71_contact_acquisition_program_c", "comment": null}, "mkto_71_contact_acquisition_program_id_c": {"type": "integer", "index": 169, "name": "mkto_71_contact_acquisition_program_id_c", "comment": null}, "mkto_71_contact_inferred_city_c": {"type": "integer", "index": 170, "name": "mkto_71_contact_inferred_city_c", "comment": null}, "mkto_71_contact_inferred_company_c": {"type": "integer", "index": 171, "name": "mkto_71_contact_inferred_company_c", "comment": null}, "mkto_71_contact_inferred_country_c": {"type": "integer", "index": 172, "name": "mkto_71_contact_inferred_country_c", "comment": null}, "mkto_71_contact_inferred_metropolitan_a_c": {"type": "integer", "index": 173, "name": "mkto_71_contact_inferred_metropolitan_a_c", "comment": null}, "mkto_71_contact_inferred_phone_area_cod_c": {"type": "integer", "index": 174, "name": "mkto_71_contact_inferred_phone_area_cod_c", "comment": null}, "mkto_71_contact_inferred_postal_code_c": {"type": "integer", "index": 175, "name": "mkto_71_contact_inferred_postal_code_c", "comment": null}, "mkto_71_contact_inferred_state_region_c": {"type": "integer", "index": 176, "name": "mkto_71_contact_inferred_state_region_c", "comment": null}, "mkto_71_contact_lead_score_c": {"type": "integer", "index": 177, "name": "mkto_71_contact_lead_score_c", "comment": null}, "mkto_71_contact_original_referrer_c": {"type": "integer", "index": 178, "name": "mkto_71_contact_original_referrer_c", "comment": null}, "mkto_71_contact_original_search_engine_c": {"type": "integer", "index": 179, "name": "mkto_71_contact_original_search_engine_c", "comment": null}, "mkto_71_contact_original_search_phrase_c": {"type": "integer", "index": 180, "name": "mkto_71_contact_original_search_phrase_c", "comment": null}, "mkto_71_contact_original_source_info_c": {"type": "integer", "index": 181, "name": "mkto_71_contact_original_source_info_c", "comment": null}, "mkto_71_contact_original_source_type_c": {"type": "integer", "index": 182, "name": "mkto_71_contact_original_source_type_c", "comment": null}, "mkto_si_hide_date_c": {"type": "integer", "index": 183, "name": "mkto_si_hide_date_c", "comment": null}, "mkto_si_last_interesting_moment_date_c": {"type": "integer", "index": 184, "name": "mkto_si_last_interesting_moment_date_c", "comment": null}, "mkto_si_last_interesting_moment_desc_c": {"type": "integer", "index": 185, "name": "mkto_si_last_interesting_moment_desc_c", "comment": null}, "mkto_si_last_interesting_moment_source_c": {"type": "integer", "index": 186, "name": "mkto_si_last_interesting_moment_source_c", "comment": null}, "mkto_si_last_interesting_moment_type_c": {"type": "integer", "index": 187, "name": "mkto_si_last_interesting_moment_type_c", "comment": null}, "mkto_si_mkto_lead_score_c": {"type": "integer", "index": 188, "name": "mkto_si_mkto_lead_score_c", "comment": null}, "mkto_si_priority_c": {"type": "integer", "index": 189, "name": "mkto_si_priority_c", "comment": null}, "mkto_si_relative_score_value_c": {"type": "integer", "index": 190, "name": "mkto_si_relative_score_value_c", "comment": null}, "mkto_si_urgency_value_c": {"type": "integer", "index": 191, "name": "mkto_si_urgency_value_c", "comment": null}, "cloudingo_agent_ces_c": {"type": "integer", "index": 192, "name": "cloudingo_agent_ces_c", "comment": null}, "cloudingo_agent_mar_c": {"type": "integer", "index": 193, "name": "cloudingo_agent_mar_c", "comment": null}, "cloudingo_agent_mas_c": {"type": "integer", "index": 194, "name": "cloudingo_agent_mas_c", "comment": null}, "cloudingo_agent_mav_c": {"type": "integer", "index": 195, "name": "cloudingo_agent_mav_c", "comment": null}, "cloudingo_agent_mrdi_c": {"type": "integer", "index": 196, "name": "cloudingo_agent_mrdi_c", "comment": null}, "cloudingo_agent_mtz_c": {"type": "integer", "index": 197, "name": "cloudingo_agent_mtz_c", "comment": null}, "cloudingo_agent_oar_c": {"type": "integer", "index": 198, "name": "cloudingo_agent_oar_c", "comment": null}, "cloudingo_agent_oas_c": {"type": "integer", "index": 199, "name": "cloudingo_agent_oas_c", "comment": null}, "cloudingo_agent_oav_c": {"type": "integer", "index": 200, "name": "cloudingo_agent_oav_c", "comment": null}, "cloudingo_agent_ordi_c": {"type": "integer", "index": 201, "name": "cloudingo_agent_ordi_c", "comment": null}, "cloudingo_agent_otz_c": {"type": "integer", "index": 202, "name": "cloudingo_agent_otz_c", "comment": null}, "do_not_sync_marketo_c": {"type": "integer", "index": 203, "name": "do_not_sync_marketo_c", "comment": null}, "phone_extension_c": {"type": "integer", "index": 204, "name": "phone_extension_c", "comment": null}, "job_function_c": {"type": "integer", "index": 205, "name": "job_function_c", "comment": null}, "job_level_c": {"type": "integer", "index": 206, "name": "job_level_c", "comment": null}, "direct_office_c": {"type": "integer", "index": 207, "name": "direct_office_c", "comment": null}, "city_c": {"type": "integer", "index": 208, "name": "city_c", "comment": null}, "country_c": {"type": "integer", "index": 209, "name": "country_c", "comment": null}, "state_c": {"type": "integer", "index": 210, "name": "state_c", "comment": null}, "secondary_email_c": {"type": "integer", "index": 211, "name": "secondary_email_c", "comment": null}, "es_seniority_c": {"type": "integer", "index": 212, "name": "es_seniority_c", "comment": null}, "source_last_lead_source_c": {"type": "integer", "index": 213, "name": "source_last_lead_source_c", "comment": null}, "source_last_lead_source_category_c": {"type": "integer", "index": 214, "name": "source_last_lead_source_category_c", "comment": null}, "source_last_lead_source_detail_c": {"type": "integer", "index": 215, "name": "source_last_lead_source_detail_c", "comment": null}, "drift_cql_c": {"type": "integer", "index": 216, "name": "drift_cql_c", "comment": null}, "hot_contact_c": {"type": "integer", "index": 217, "name": "hot_contact_c", "comment": null}, "behavioral_score_c": {"type": "integer", "index": 218, "name": "behavioral_score_c", "comment": null}, "unique_email_c": {"type": "integer", "index": 219, "name": "unique_email_c", "comment": null}, "is_emea_event_routing_c": {"type": "integer", "index": 220, "name": "is_emea_event_routing_c", "comment": null}, "csi_code_c": {"type": "integer", "index": 221, "name": "csi_code_c", "comment": null}, "clearbit_role_c": {"type": "integer", "index": 222, "name": "clearbit_role_c", "comment": null}, "clearbit_seniority_c": {"type": "integer", "index": 223, "name": "clearbit_seniority_c", "comment": null}, "clearbit_sub_role_c": {"type": "integer", "index": 224, "name": "clearbit_sub_role_c", "comment": null}, "rh_2_currency_test_c": {"type": "integer", "index": 225, "name": "rh_2_currency_test_c", "comment": null}, "rh_2_describe_c": {"type": "integer", "index": 226, "name": "rh_2_describe_c", "comment": null}, "rh_2_integer_test_c": {"type": "integer", "index": 227, "name": "rh_2_integer_test_c", "comment": null}, "created_by_role_c": {"type": "integer", "index": 228, "name": "created_by_role_c", "comment": null}, "demographic_score_c": {"type": "integer", "index": 229, "name": "demographic_score_c", "comment": null}, "country_code_c": {"type": "integer", "index": 230, "name": "country_code_c", "comment": null}, "state_code_c": {"type": "integer", "index": 231, "name": "state_code_c", "comment": null}, "attended_event_c": {"type": "integer", "index": 232, "name": "attended_event_c", "comment": null}, "zoominfo_technologies_c": {"type": "integer", "index": 233, "name": "zoominfo_technologies_c", "comment": null}, "mql_date_c": {"type": "integer", "index": 234, "name": "mql_date_c", "comment": null}, "user_gems_user_gems_id_c": {"type": "integer", "index": 235, "name": "user_gems_user_gems_id_c", "comment": null}, "dozisf_zoom_info_company_id_c": {"type": "integer", "index": 236, "name": "dozisf_zoom_info_company_id_c", "comment": null}, "dozisf_zoom_info_first_updated_c": {"type": "integer", "index": 237, "name": "dozisf_zoom_info_first_updated_c", "comment": null}, "dozisf_zoom_info_id_c": {"type": "integer", "index": 238, "name": "dozisf_zoom_info_id_c", "comment": null}, "dozisf_zoom_info_last_updated_c": {"type": "integer", "index": 239, "name": "dozisf_zoom_info_last_updated_c", "comment": null}, "lean_data_manual_route_trigger_c": {"type": "integer", "index": 240, "name": "lean_data_manual_route_trigger_c", "comment": null}, "first_mql_date_c": {"type": "integer", "index": 241, "name": "first_mql_date_c", "comment": null}, "active_relationship_c": {"type": "integer", "index": 242, "name": "active_relationship_c", "comment": null}, "clarus_date_c": {"type": "integer", "index": 243, "name": "clarus_date_c", "comment": null}, "clarus_editor_c": {"type": "integer", "index": 244, "name": "clarus_editor_c", "comment": null}, "clarus_notes_c": {"type": "integer", "index": 245, "name": "clarus_notes_c", "comment": null}, "clarus_project_c": {"type": "integer", "index": 246, "name": "clarus_project_c", "comment": null}, "clarus_status_c": {"type": "integer", "index": 247, "name": "clarus_status_c", "comment": null}, "historical_contact_status_c": {"type": "integer", "index": 248, "name": "historical_contact_status_c", "comment": null}, "fivetran_account_association_date_c": {"type": "integer", "index": 249, "name": "fivetran_account_association_date_c", "comment": null}, "fivetran_account_user_role_s_c": {"type": "integer", "index": 250, "name": "fivetran_account_user_role_s_c", "comment": null}, "mql_reason_c": {"type": "integer", "index": 251, "name": "mql_reason_c", "comment": null}, "attempting_contact_date_time_c": {"type": "integer", "index": 252, "name": "attempting_contact_date_time_c", "comment": null}, "linked_in_url_c": {"type": "integer", "index": 253, "name": "linked_in_url_c", "comment": null}, "trial_contact_start_date_c": {"type": "integer", "index": 254, "name": "trial_contact_start_date_c", "comment": null}, "contact_holdover_c": {"type": "integer", "index": 255, "name": "contact_holdover_c", "comment": null}, "bill_to_contact_hidden_c": {"type": "integer", "index": 256, "name": "bill_to_contact_hidden_c", "comment": null}, "enrichment_request_c": {"type": "integer", "index": 257, "name": "enrichment_request_c", "comment": null}, "meta_data_create_date_c": {"type": "integer", "index": 258, "name": "meta_data_create_date_c", "comment": null}, "primary_se_c": {"type": "integer", "index": 259, "name": "primary_se_c", "comment": null}, "unqualified_reason_c": {"type": "integer", "index": 260, "name": "unqualified_reason_c", "comment": null}, "opp_handoff_ae_c": {"type": "integer", "index": 261, "name": "opp_handoff_ae_c", "comment": null}, "marketing_connector_interest_c": {"type": "integer", "index": 262, "name": "marketing_connector_interest_c", "comment": null}, "recent_marketing_campaign_status_c": {"type": "integer", "index": 263, "name": "recent_marketing_campaign_status_c", "comment": null}, "salesloft_cadence_trigger_c": {"type": "integer", "index": 264, "name": "salesloft_cadence_trigger_c", "comment": null}, "last_ae_activity_owner_c": {"type": "integer", "index": 265, "name": "last_ae_activity_owner_c", "comment": null}, "last_bdr_activity_owner_c": {"type": "integer", "index": 266, "name": "last_bdr_activity_owner_c", "comment": null}, "last_manual_ae_activity_date_c": {"type": "integer", "index": 267, "name": "last_manual_ae_activity_date_c", "comment": null}, "last_manual_bdr_activity_date_c": {"type": "integer", "index": 268, "name": "last_manual_bdr_activity_date_c", "comment": null}, "leandata_contact_owner_override_c": {"type": "integer", "index": 269, "name": "leandata_contact_owner_override_c", "comment": null}, "potential_fivetran_use_case_c": {"type": "integer", "index": 270, "name": "potential_fivetran_use_case_c", "comment": null}, "lean_data_router_completion_date_time_c": {"type": "integer", "index": 271, "name": "lean_data_router_completion_date_time_c", "comment": null}, "partner_territory_c": {"type": "integer", "index": 272, "name": "partner_territory_c", "comment": null}, "partner_company_c": {"type": "integer", "index": 273, "name": "partner_company_c", "comment": null}, "bizible_2_ad_campaign_name_ft_c": {"type": "integer", "index": 274, "name": "bizible_2_ad_campaign_name_ft_c", "comment": null}, "bizible_2_ad_campaign_name_lc_c": {"type": "integer", "index": 275, "name": "bizible_2_ad_campaign_name_lc_c", "comment": null}, "bizible_2_bizible_id_c": {"type": "integer", "index": 276, "name": "bizible_2_bizible_id_c", "comment": null}, "bizible_2_landing_page_ft_c": {"type": "integer", "index": 277, "name": "bizible_2_landing_page_ft_c", "comment": null}, "bizible_2_landing_page_lc_c": {"type": "integer", "index": 278, "name": "bizible_2_landing_page_lc_c", "comment": null}, "bizible_2_marketing_channel_ft_c": {"type": "integer", "index": 279, "name": "bizible_2_marketing_channel_ft_c", "comment": null}, "bizible_2_marketing_channel_lc_c": {"type": "integer", "index": 280, "name": "bizible_2_marketing_channel_lc_c", "comment": null}, "bizible_2_touchpoint_date_ft_c": {"type": "integer", "index": 281, "name": "bizible_2_touchpoint_date_ft_c", "comment": null}, "bizible_2_touchpoint_date_lc_c": {"type": "integer", "index": 282, "name": "bizible_2_touchpoint_date_lc_c", "comment": null}, "bizible_2_touchpoint_source_ft_c": {"type": "integer", "index": 283, "name": "bizible_2_touchpoint_source_ft_c", "comment": null}, "bizible_2_touchpoint_source_lc_c": {"type": "integer", "index": 284, "name": "bizible_2_touchpoint_source_lc_c", "comment": null}, "sales_email_opt_out_c": {"type": "integer", "index": 285, "name": "sales_email_opt_out_c", "comment": null}, "sales_email_opt_out_date_time_c": {"type": "integer", "index": 286, "name": "sales_email_opt_out_date_time_c", "comment": null}, "celigo_sfnsio_net_suite_id_c": {"type": "integer", "index": 287, "name": "celigo_sfnsio_net_suite_id_c", "comment": null}, "celigo_sfnsio_net_suite_record_c": {"type": "integer", "index": 288, "name": "celigo_sfnsio_net_suite_record_c", "comment": null}, "celigo_sfnsio_net_suite_sync_error_c": {"type": "integer", "index": 289, "name": "celigo_sfnsio_net_suite_sync_error_c", "comment": null}, "celigo_sfnsio_skip_export_to_net_suite_c": {"type": "integer", "index": 290, "name": "celigo_sfnsio_skip_export_to_net_suite_c", "comment": null}, "celigo_sfnsio_test_mode_record_c": {"type": "integer", "index": 291, "name": "celigo_sfnsio_test_mode_record_c", "comment": null}, "ironclad_workflow_c": {"type": "integer", "index": 292, "name": "ironclad_workflow_c", "comment": null}, "last_sales_activity_date_time_c": {"type": "integer", "index": 293, "name": "last_sales_activity_date_time_c", "comment": null}, "user_activity_logged_by_c": {"type": "integer", "index": 294, "name": "user_activity_logged_by_c", "comment": null}, "first_activity_after_mql_date_c": {"type": "integer", "index": 295, "name": "first_activity_after_mql_date_c", "comment": null}, "last_sdr_activity_owner_c": {"type": "integer", "index": 296, "name": "last_sdr_activity_owner_c", "comment": null}, "last_sdr_activity_date_c": {"type": "integer", "index": 297, "name": "last_sdr_activity_date_c", "comment": null}, "beta_connector_interest_c": {"type": "integer", "index": 298, "name": "beta_connector_interest_c", "comment": null}, "first_manual_activity_after_mql_date_c": {"type": "integer", "index": 299, "name": "first_manual_activity_after_mql_date_c", "comment": null}, "user_gems_ug_past_infos_c": {"type": "integer", "index": 300, "name": "user_gems_ug_past_infos_c", "comment": null}, "user_gems_ug_current_infos_c": {"type": "integer", "index": 301, "name": "user_gems_ug_current_infos_c", "comment": null}, "user_gems_ug_created_by_ug_c": {"type": "integer", "index": 302, "name": "user_gems_ug_created_by_ug_c", "comment": null}, "free_trial_email_confirmed_date_c": {"type": "integer", "index": 303, "name": "free_trial_email_confirmed_date_c", "comment": null}, "routed_from_manual_bdr_ae_activity_c": {"type": "integer", "index": 304, "name": "routed_from_manual_bdr_ae_activity_c", "comment": null}, "dnboptimizer_dn_bcontact_record_c": {"type": "integer", "index": 305, "name": "dnboptimizer_dn_bcontact_record_c", "comment": null}, "i_sell_avention_id_c": {"type": "integer", "index": 306, "name": "i_sell_avention_id_c", "comment": null}, "persona_c": {"type": "integer", "index": 307, "name": "persona_c", "comment": null}, "last_marketing_interesting_moment_date_c": {"type": "integer", "index": 308, "name": "last_marketing_interesting_moment_date_c", "comment": null}, "verified_c": {"type": "integer", "index": 309, "name": "verified_c", "comment": null}, "salesloft_owner_c": {"type": "integer", "index": 310, "name": "salesloft_owner_c", "comment": null}, "salesloft_owner_sf_c": {"type": "integer", "index": 311, "name": "salesloft_owner_sf_c", "comment": null}, "email_opt_out_date_time_c": {"type": "integer", "index": 312, "name": "email_opt_out_date_time_c", "comment": null}, "pbf_startup_primary_role_c": {"type": "integer", "index": 313, "name": "pbf_startup_primary_role_c", "comment": null}, "pbf_startup_certify_eligibility_c": {"type": "integer", "index": 314, "name": "pbf_startup_certify_eligibility_c", "comment": null}, "engagio_intent_minutes_last_30_days_c": {"type": "integer", "index": 315, "name": "engagio_intent_minutes_last_30_days_c", "comment": null}, "engagio_engagement_minutes_last_3_months_c": {"type": "integer", "index": 316, "name": "engagio_engagement_minutes_last_3_months_c", "comment": null}, "engagio_engagement_minutes_last_7_days_c": {"type": "integer", "index": 317, "name": "engagio_engagement_minutes_last_7_days_c", "comment": null}, "engagio_first_engagement_date_c": {"type": "integer", "index": 318, "name": "engagio_first_engagement_date_c", "comment": null}, "engagio_department_c": {"type": "integer", "index": 319, "name": "engagio_department_c", "comment": null}, "engagio_role_c": {"type": "integer", "index": 320, "name": "engagio_role_c", "comment": null}, "mql_date_changed_c": {"type": "integer", "index": 321, "name": "mql_date_changed_c", "comment": null}, "first_activity_after_mql_changed_c": {"type": "integer", "index": 322, "name": "first_activity_after_mql_changed_c", "comment": null}, "birthdate": {"type": "timestamp without time zone", "index": 323, "name": "birthdate", "comment": null}, "legacy_hvr_id_c": {"type": "integer", "index": 324, "name": "legacy_hvr_id_c", "comment": null}, "has_opted_out_of_fax": {"type": "integer", "index": 325, "name": "has_opted_out_of_fax", "comment": null}, "other_latitude": {"type": "integer", "index": 326, "name": "other_latitude", "comment": null}, "username_c": {"type": "integer", "index": 327, "name": "username_c", "comment": null}, "assistant_name": {"type": "integer", "index": 328, "name": "assistant_name", "comment": null}, "created_at_c": {"type": "integer", "index": 329, "name": "created_at_c", "comment": null}, "partner_contact_deprecate_c": {"type": "integer", "index": 330, "name": "partner_contact_deprecate_c", "comment": null}, "other_street": {"type": "integer", "index": 331, "name": "other_street", "comment": null}, "other_state": {"type": "integer", "index": 332, "name": "other_state", "comment": null}, "home_phone": {"type": "integer", "index": 333, "name": "home_phone", "comment": null}, "other_city": {"type": "integer", "index": 334, "name": "other_city", "comment": null}, "company_c": {"type": "integer", "index": 335, "name": "company_c", "comment": null}, "opportunity_c": {"type": "integer", "index": 336, "name": "opportunity_c", "comment": null}, "hvr_update_c": {"type": "integer", "index": 337, "name": "hvr_update_c", "comment": null}, "other_phone": {"type": "integer", "index": 338, "name": "other_phone", "comment": null}, "other_geocode_accuracy": {"type": "integer", "index": 339, "name": "other_geocode_accuracy", "comment": null}, "other_postal_code": {"type": "integer", "index": 340, "name": "other_postal_code", "comment": null}, "other_country": {"type": "integer", "index": 341, "name": "other_country", "comment": null}, "assistant_phone": {"type": "integer", "index": 342, "name": "assistant_phone", "comment": null}, "jigsaw": {"type": "integer", "index": 343, "name": "jigsaw", "comment": null}, "avatar_c": {"type": "integer", "index": 344, "name": "avatar_c", "comment": null}, "other_longitude": {"type": "integer", "index": 345, "name": "other_longitude", "comment": null}, "lean_data_status_info_c": {"type": "integer", "index": 346, "name": "lean_data_status_info_c", "comment": null}, "analytics_id_c": {"type": "integer", "index": 347, "name": "analytics_id_c", "comment": null}, "dnb_primary_address_postal_code_c": {"type": "integer", "index": 348, "name": "dnb_primary_address_postal_code_c", "comment": null}, "dnb_contact_phone_c": {"type": "integer", "index": 349, "name": "dnb_contact_phone_c", "comment": null}, "dnb_email_deliverability_score_c": {"type": "integer", "index": 350, "name": "dnb_email_deliverability_score_c", "comment": null}, "dnb_job_title_c": {"type": "integer", "index": 351, "name": "dnb_job_title_c", "comment": null}, "dnb_email_c": {"type": "integer", "index": 352, "name": "dnb_email_c", "comment": null}, "dnb_primary_address_city_c": {"type": "integer", "index": 353, "name": "dnb_primary_address_city_c", "comment": null}, "dnb_phone_accuracy_score_c": {"type": "integer", "index": 354, "name": "dnb_phone_accuracy_score_c", "comment": null}, "dnb_primary_address_state_province_c": {"type": "integer", "index": 355, "name": "dnb_primary_address_state_province_c", "comment": null}, "dnb_primary_address_state_province_abbre_c": {"type": "integer", "index": 356, "name": "dnb_primary_address_state_province_abbre_c", "comment": null}, "dnb_primary_address_country_region_code_c": {"type": "integer", "index": 357, "name": "dnb_primary_address_country_region_code_c", "comment": null}, "email_opt_in_double_c": {"type": "integer", "index": 358, "name": "email_opt_in_double_c", "comment": null}, "phone_number_catch_all_c": {"type": "integer", "index": 359, "name": "phone_number_catch_all_c", "comment": null}, "contact_owners_manager_stamped_c": {"type": "integer", "index": 360, "name": "contact_owners_manager_stamped_c", "comment": null}, "fivetran_account_id_c": {"type": "integer", "index": 361, "name": "fivetran_account_id_c", "comment": null}, "contacts_domain_exists_c": {"type": "integer", "index": 362, "name": "contacts_domain_exists_c", "comment": null}, "utm_id_c": {"type": "integer", "index": 363, "name": "utm_id_c", "comment": null}, "self_service_routing_c": {"type": "integer", "index": 364, "name": "self_service_routing_c", "comment": null}, "no_geo_data_c": {"type": "integer", "index": 365, "name": "no_geo_data_c", "comment": null}, "to_be_deleted_salesloft_backfill_c": {"type": "integer", "index": 366, "name": "to_be_deleted_salesloft_backfill_c", "comment": null}, "do_not_sync_reason_marketo_c": {"type": "integer", "index": 367, "name": "do_not_sync_reason_marketo_c", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 368, "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.salesforce_source.salesforce.contact"}, "source.salesforce_source.salesforce.event": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_event_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "activity_date": {"type": "timestamp without time zone", "index": 4, "name": "activity_date", "comment": null}, "activity_date_time": {"type": "timestamp without time zone", "index": 5, "name": "activity_date_time", "comment": null}, "created_by_id": {"type": "text", "index": 6, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 7, "name": "created_date", "comment": null}, "description": {"type": "text", "index": 8, "name": "description", "comment": null}, "duration_in_minutes": {"type": "integer", "index": 9, "name": "duration_in_minutes", "comment": null}, "end_date_time": {"type": "timestamp without time zone", "index": 10, "name": "end_date_time", "comment": null}, "event_subtype": {"type": "text", "index": 11, "name": "event_subtype", "comment": null}, "group_event_type": {"type": "integer", "index": 12, "name": "group_event_type", "comment": null}, "invitee_uuid_c": {"type": "integer", "index": 13, "name": "invitee_uuid_c", "comment": null}, "is_child": {"type": "boolean", "index": 14, "name": "is_child", "comment": null}, "is_deleted": {"type": "boolean", "index": 15, "name": "is_deleted", "comment": null}, "is_group_event": {"type": "boolean", "index": 16, "name": "is_group_event", "comment": null}, "is_private": {"type": "boolean", "index": 17, "name": "is_private", "comment": null}, "is_recurrence": {"type": "boolean", "index": 18, "name": "is_recurrence", "comment": null}, "is_reminder_set": {"type": "boolean", "index": 19, "name": "is_reminder_set", "comment": null}, "last_modified_by_id": {"type": "text", "index": 20, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 21, "name": "last_modified_date", "comment": null}, "location": {"type": "integer", "index": 22, "name": "location", "comment": null}, "no_show_c": {"type": "boolean", "index": 23, "name": "no_show_c", "comment": null}, "owner_id": {"type": "text", "index": 24, "name": "owner_id", "comment": null}, "recurrence_activity_id": {"type": "integer", "index": 25, "name": "recurrence_activity_id", "comment": null}, "recurrence_day_of_month": {"type": "integer", "index": 26, "name": "recurrence_day_of_month", "comment": null}, "recurrence_day_of_week_mask": {"type": "integer", "index": 27, "name": "recurrence_day_of_week_mask", "comment": null}, "recurrence_end_date_only": {"type": "timestamp without time zone", "index": 28, "name": "recurrence_end_date_only", "comment": null}, "recurrence_instance": {"type": "integer", "index": 29, "name": "recurrence_instance", "comment": null}, "recurrence_interval": {"type": "integer", "index": 30, "name": "recurrence_interval", "comment": null}, "recurrence_month_of_year": {"type": "integer", "index": 31, "name": "recurrence_month_of_year", "comment": null}, "recurrence_start_date_time": {"type": "timestamp without time zone", "index": 32, "name": "recurrence_start_date_time", "comment": null}, "recurrence_time_zone_sid_key": {"type": "integer", "index": 33, "name": "recurrence_time_zone_sid_key", "comment": null}, "recurrence_type": {"type": "integer", "index": 34, "name": "recurrence_type", "comment": null}, "referral_account_c": {"type": "integer", "index": 35, "name": "referral_account_c", "comment": null}, "referral_contact_c": {"type": "integer", "index": 36, "name": "referral_contact_c", "comment": null}, "reminder_date_time": {"type": "timestamp without time zone", "index": 37, "name": "reminder_date_time", "comment": null}, "show_as": {"type": "text", "index": 38, "name": "show_as", "comment": null}, "start_date_time": {"type": "timestamp without time zone", "index": 39, "name": "start_date_time", "comment": null}, "subject": {"type": "text", "index": 40, "name": "subject", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 41, "name": "system_modstamp", "comment": null}, "type": {"type": "text", "index": 42, "name": "type", "comment": null}, "what_count": {"type": "integer", "index": 43, "name": "what_count", "comment": null}, "what_id": {"type": "text", "index": 44, "name": "what_id", "comment": null}, "who_count": {"type": "integer", "index": 45, "name": "who_count", "comment": null}, "who_id": {"type": "text", "index": 46, "name": "who_id", "comment": null}, "first_meeting_held_c": {"type": "integer", "index": 47, "name": "first_meeting_held_c", "comment": null}, "associated_sdr_c": {"type": "integer", "index": 48, "name": "associated_sdr_c", "comment": null}, "first_meeting_c": {"type": "integer", "index": 49, "name": "first_meeting_c", "comment": null}, "call_recording_c": {"type": "integer", "index": 50, "name": "call_recording_c", "comment": null}, "affectlayer_chorus_call_id_c": {"type": "integer", "index": 51, "name": "affectlayer_chorus_call_id_c", "comment": null}, "affectlayer_affect_layer_call_id_c": {"type": "integer", "index": 52, "name": "affectlayer_affect_layer_call_id_c", "comment": null}, "last_rep_activity_date_c": {"type": "integer", "index": 53, "name": "last_rep_activity_date_c", "comment": null}, "lid_url_c": {"type": "integer", "index": 54, "name": "lid_url_c", "comment": null}, "lid_date_sent_c": {"type": "integer", "index": 55, "name": "lid_date_sent_c", "comment": null}, "sales_loft_step_id_c": {"type": "integer", "index": 56, "name": "sales_loft_step_id_c", "comment": null}, "sales_loft_step_name_c": {"type": "integer", "index": 57, "name": "sales_loft_step_name_c", "comment": null}, "sales_loft_step_type_c": {"type": "integer", "index": 58, "name": "sales_loft_step_type_c", "comment": null}, "sales_loft_email_template_id_c": {"type": "integer", "index": 59, "name": "sales_loft_email_template_id_c", "comment": null}, "sales_loft_external_identifier_c": {"type": "integer", "index": 60, "name": "sales_loft_external_identifier_c", "comment": null}, "sales_loft_cadence_id_c": {"type": "integer", "index": 61, "name": "sales_loft_cadence_id_c", "comment": null}, "sales_loft_clicked_count_c": {"type": "integer", "index": 62, "name": "sales_loft_clicked_count_c", "comment": null}, "sales_loft_cadence_name_c": {"type": "integer", "index": 63, "name": "sales_loft_cadence_name_c", "comment": null}, "sales_loft_reply_count_c": {"type": "integer", "index": 64, "name": "sales_loft_reply_count_c", "comment": null}, "call_disposition_c": {"type": "integer", "index": 65, "name": "call_disposition_c", "comment": null}, "sales_loft_email_template_title_c": {"type": "integer", "index": 66, "name": "sales_loft_email_template_title_c", "comment": null}, "sales_loft_step_day_new_c": {"type": "integer", "index": 67, "name": "sales_loft_step_day_new_c", "comment": null}, "call_disposition_2_c": {"type": "integer", "index": 68, "name": "call_disposition_2_c", "comment": null}, "sales_loft_viewed_count_c": {"type": "integer", "index": 69, "name": "sales_loft_viewed_count_c", "comment": null}, "sales_loft_1_sales_loft_step_day_c": {"type": "integer", "index": 70, "name": "sales_loft_1_sales_loft_step_day_c", "comment": null}, "sales_loft_1_sales_loft_clicked_count_c": {"type": "integer", "index": 71, "name": "sales_loft_1_sales_loft_clicked_count_c", "comment": null}, "sales_loft_1_sales_loft_view_count_c": {"type": "integer", "index": 72, "name": "sales_loft_1_sales_loft_view_count_c", "comment": null}, "sales_loft_1_call_disposition_c": {"type": "integer", "index": 73, "name": "sales_loft_1_call_disposition_c", "comment": null}, "sales_loft_1_sales_loft_replies_count_c": {"type": "integer", "index": 74, "name": "sales_loft_1_sales_loft_replies_count_c", "comment": null}, "sales_loft_1_sales_loft_cadence_name_c": {"type": "integer", "index": 75, "name": "sales_loft_1_sales_loft_cadence_name_c", "comment": null}, "sales_loft_1_call_sentiment_c": {"type": "integer", "index": 76, "name": "sales_loft_1_call_sentiment_c", "comment": null}, "sales_loft_1_sales_loft_email_template_title_c": {"type": "integer", "index": 77, "name": "sales_loft_1_sales_loft_email_template_title_c", "comment": null}, "is_recurrence_2": {"type": "boolean", "index": 78, "name": "is_recurrence_2", "comment": null}, "is_recurrence_2_exception": {"type": "boolean", "index": 79, "name": "is_recurrence_2_exception", "comment": null}, "is_recurrence_2_exclusion": {"type": "boolean", "index": 80, "name": "is_recurrence_2_exclusion", "comment": null}, "recurrence_2_pattern_start_date": {"type": "timestamp without time zone", "index": 81, "name": "recurrence_2_pattern_start_date", "comment": null}, "recurrence_2_pattern_text": {"type": "integer", "index": 82, "name": "recurrence_2_pattern_text", "comment": null}, "recurrence_2_pattern_time_zone": {"type": "integer", "index": 83, "name": "recurrence_2_pattern_time_zone", "comment": null}, "recurrence_2_pattern_version": {"type": "integer", "index": 84, "name": "recurrence_2_pattern_version", "comment": null}, "co_selling_activity_c": {"type": "integer", "index": 85, "name": "co_selling_activity_c", "comment": null}, "is_a_co_sell_activity_c": {"type": "integer", "index": 86, "name": "is_a_co_sell_activity_c", "comment": null}, "partner_contact_c": {"type": "integer", "index": 87, "name": "partner_contact_c", "comment": null}, "description_c": {"type": "integer", "index": 88, "name": "description_c", "comment": null}, "campaign_c": {"type": "integer", "index": 89, "name": "campaign_c", "comment": null}, "event_name_c": {"type": "integer", "index": 90, "name": "event_name_c", "comment": null}, "partner_account_c": {"type": "integer", "index": 91, "name": "partner_account_c", "comment": null}, "topic_c": {"type": "integer", "index": 92, "name": "topic_c", "comment": null}, "attendance_number_c": {"type": "integer", "index": 93, "name": "attendance_number_c", "comment": null}, "partner_activity_type_c": {"type": "integer", "index": 94, "name": "partner_activity_type_c", "comment": null}, "how_did_you_bring_value_or_create_trust_c": {"type": "integer", "index": 95, "name": "how_did_you_bring_value_or_create_trust_c", "comment": null}, "proof_of_referral_c": {"type": "integer", "index": 96, "name": "proof_of_referral_c", "comment": null}, "how_did_you_bring_value_or_earn_trust_c": {"type": "integer", "index": 97, "name": "how_did_you_bring_value_or_earn_trust_c", "comment": null}, "duration_in_minutes_c": {"type": "integer", "index": 98, "name": "duration_in_minutes_c", "comment": null}, "vidyard_c": {"type": "boolean", "index": 99, "name": "vidyard_c", "comment": null}, "collections_hold_c": {"type": "boolean", "index": 100, "name": "collections_hold_c", "comment": null}, "execute_collections_plan_activity_c": {"type": "boolean", "index": 101, "name": "execute_collections_plan_activity_c", "comment": null}, "expected_payment_date_c": {"type": "integer", "index": 102, "name": "expected_payment_date_c", "comment": null}, "end_date": {"type": "timestamp without time zone", "index": 103, "name": "end_date", "comment": null}, "opportunity_c": {"type": "integer", "index": 104, "name": "opportunity_c", "comment": null}, "meeting_type_c": {"type": "integer", "index": 105, "name": "meeting_type_c", "comment": null}, "meeting_name_c": {"type": "integer", "index": 106, "name": "meeting_name_c", "comment": null}, "bizible_2_bizible_id_c": {"type": "integer", "index": 107, "name": "bizible_2_bizible_id_c", "comment": null}, "bizible_2_bizible_touchpoint_date_c": {"type": "integer", "index": 108, "name": "bizible_2_bizible_touchpoint_date_c", "comment": null}, "assigned_to_role_c": {"type": "integer", "index": 109, "name": "assigned_to_role_c", "comment": null}, "assigned_to_name_c": {"type": "integer", "index": 110, "name": "assigned_to_name_c", "comment": null}, "legacy_hvr_id_c": {"type": "integer", "index": 111, "name": "legacy_hvr_id_c", "comment": null}, "is_archived": {"type": "boolean", "index": 112, "name": "is_archived", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 113, "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.salesforce_source.salesforce.event"}, "source.salesforce_source.salesforce.lead": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_lead_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"country": {"type": "integer", "index": 1, "name": "country", "comment": null}, "email_bounced_reason": {"type": "integer", "index": 2, "name": "email_bounced_reason", "comment": null}, "email_bounced_date": {"type": "timestamp without time zone", "index": 3, "name": "email_bounced_date", "comment": null}, "owner_id": {"type": "text", "index": 4, "name": "owner_id", "comment": null}, "secondary_email_c": {"type": "integer", "index": 5, "name": "secondary_email_c", "comment": null}, "lead_source": {"type": "integer", "index": 6, "name": "lead_source", "comment": null}, "converted_date": {"type": "timestamp without time zone", "index": 7, "name": "converted_date", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 8, "name": "last_modified_date", "comment": null}, "master_record_id": {"type": "integer", "index": 9, "name": "master_record_id", "comment": null}, "last_modified_by_id": {"type": "text", "index": 10, "name": "last_modified_by_id", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 11, "name": "system_modstamp", "comment": null}, "geocode_accuracy": {"type": "integer", "index": 12, "name": "geocode_accuracy", "comment": null}, "converted_contact_id": {"type": "text", "index": 13, "name": "converted_contact_id", "comment": null}, "up_region_c": {"type": "integer", "index": 14, "name": "up_region_c", "comment": null}, "id": {"type": "text", "index": 15, "name": "id", "comment": null}, "photo_url": {"type": "text", "index": 16, "name": "photo_url", "comment": null}, "state": {"type": "integer", "index": 17, "name": "state", "comment": null}, "longitude": {"type": "integer", "index": 18, "name": "longitude", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 19, "name": "last_referenced_date", "comment": null}, "up_district_c": {"type": "integer", "index": 20, "name": "up_district_c", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 21, "name": "last_activity_date", "comment": null}, "country_code": {"type": "integer", "index": 22, "name": "country_code", "comment": null}, "phone": {"type": "integer", "index": 23, "name": "phone", "comment": null}, "mc_4_sf_mc_subscriber_c": {"type": "integer", "index": 24, "name": "mc_4_sf_mc_subscriber_c", "comment": null}, "name": {"type": "text", "index": 25, "name": "name", "comment": null}, "jigsaw_contact_id": {"type": "integer", "index": 26, "name": "jigsaw_contact_id", "comment": null}, "lead_source_detail_c": {"type": "integer", "index": 27, "name": "lead_source_detail_c", "comment": null}, "created_by_id": {"type": "text", "index": 28, "name": "created_by_id", "comment": null}, "salutation": {"type": "integer", "index": 29, "name": "salutation", "comment": null}, "is_converted": {"type": "boolean", "index": 30, "name": "is_converted", "comment": null}, "state_code": {"type": "integer", "index": 31, "name": "state_code", "comment": null}, "is_unread_by_owner": {"type": "boolean", "index": 32, "name": "is_unread_by_owner", "comment": null}, "status": {"type": "text", "index": 33, "name": "status", "comment": null}, "city": {"type": "integer", "index": 34, "name": "city", "comment": null}, "latitude": {"type": "integer", "index": 35, "name": "latitude", "comment": null}, "cbit_clearbit_c": {"type": "integer", "index": 36, "name": "cbit_clearbit_c", "comment": null}, "industry": {"type": "text", "index": 37, "name": "industry", "comment": null}, "title": {"type": "integer", "index": 38, "name": "title", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 39, "name": "_fivetran_synced", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 40, "name": "last_viewed_date", "comment": null}, "converted_opportunity_id": {"type": "integer", "index": 41, "name": "converted_opportunity_id", "comment": null}, "is_deleted": {"type": "boolean", "index": 42, "name": "is_deleted", "comment": null}, "street": {"type": "integer", "index": 43, "name": "street", "comment": null}, "company": {"type": "text", "index": 44, "name": "company", "comment": null}, "first_name": {"type": "text", "index": 45, "name": "first_name", "comment": null}, "email": {"type": "text", "index": 46, "name": "email", "comment": null}, "website": {"type": "integer", "index": 47, "name": "website", "comment": null}, "last_name": {"type": "text", "index": 48, "name": "last_name", "comment": null}, "number_of_employees": {"type": "integer", "index": 49, "name": "number_of_employees", "comment": null}, "up_territory_c": {"type": "integer", "index": 50, "name": "up_territory_c", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 51, "name": "created_date", "comment": null}, "gclid_c": {"type": "integer", "index": 52, "name": "gclid_c", "comment": null}, "active_in_sequence_c": {"type": "boolean", "index": 53, "name": "active_in_sequence_c", "comment": null}, "postal_code": {"type": "integer", "index": 54, "name": "postal_code", "comment": null}, "cbit_clearbit_ready_c": {"type": "boolean", "index": 55, "name": "cbit_clearbit_ready_c", "comment": null}, "has_opted_out_of_email": {"type": "boolean", "index": 56, "name": "has_opted_out_of_email", "comment": null}, "converted_account_id": {"type": "text", "index": 57, "name": "converted_account_id", "comment": null}, "mobile_phone": {"type": "integer", "index": 58, "name": "mobile_phone", "comment": null}, "calendly_created_c": {"type": "integer", "index": 59, "name": "calendly_created_c", "comment": null}, "account_c": {"type": "integer", "index": 60, "name": "account_c", "comment": null}, "all_connectors_c": {"type": "integer", "index": 61, "name": "all_connectors_c", "comment": null}, "all_data_warehouses_c": {"type": "integer", "index": 62, "name": "all_data_warehouses_c", "comment": null}, "bi_tools_c": {"type": "integer", "index": 63, "name": "bi_tools_c", "comment": null}, "competitors_c": {"type": "integer", "index": 64, "name": "competitors_c", "comment": null}, "annual_revenue": {"type": "integer", "index": 65, "name": "annual_revenue", "comment": null}, "connectors_products_c": {"type": "integer", "index": 66, "name": "connectors_products_c", "comment": null}, "contact_c": {"type": "integer", "index": 67, "name": "contact_c", "comment": null}, "data_warehouse_products_c": {"type": "integer", "index": 68, "name": "data_warehouse_products_c", "comment": null}, "notes_c": {"type": "integer", "index": 69, "name": "notes_c", "comment": null}, "timeframe_c": {"type": "integer", "index": 70, "name": "timeframe_c", "comment": null}, "account_all_products_c": {"type": "integer", "index": 71, "name": "account_all_products_c", "comment": null}, "account_bi_tools_c": {"type": "integer", "index": 72, "name": "account_bi_tools_c", "comment": null}, "account_data_warehouses_c": {"type": "integer", "index": 73, "name": "account_data_warehouses_c", "comment": null}, "opportunity_competitors_c": {"type": "integer", "index": 74, "name": "opportunity_competitors_c", "comment": null}, "opportunity_products_c": {"type": "integer", "index": 75, "name": "opportunity_products_c", "comment": null}, "description": {"type": "integer", "index": 76, "name": "description", "comment": null}, "referral_account_c": {"type": "integer", "index": 77, "name": "referral_account_c", "comment": null}, "referral_contact_c": {"type": "integer", "index": 78, "name": "referral_contact_c", "comment": null}, "volume_in_millions_c": {"type": "integer", "index": 79, "name": "volume_in_millions_c", "comment": null}, "feature_requests_c": {"type": "integer", "index": 80, "name": "feature_requests_c", "comment": null}, "lead_number_c": {"type": "integer", "index": 81, "name": "lead_number_c", "comment": null}, "demo_scheduled_by_calenderly_c": {"type": "boolean", "index": 82, "name": "demo_scheduled_by_calenderly_c", "comment": null}, "to_delete_c": {"type": "boolean", "index": 83, "name": "to_delete_c", "comment": null}, "bounced_email_c": {"type": "integer", "index": 84, "name": "bounced_email_c", "comment": null}, "email_quality_c": {"type": "boolean", "index": 85, "name": "email_quality_c", "comment": null}, "email_quality_catchall_c": {"type": "integer", "index": 86, "name": "email_quality_catchall_c", "comment": null}, "old_lead_source_c": {"type": "integer", "index": 87, "name": "old_lead_source_c", "comment": null}, "email_bounced_c": {"type": "boolean", "index": 88, "name": "email_bounced_c", "comment": null}, "old_lead_source_detail_c": {"type": "integer", "index": 89, "name": "old_lead_source_detail_c", "comment": null}, "utm_medium_c": {"type": "integer", "index": 90, "name": "utm_medium_c", "comment": null}, "utm_source_c": {"type": "integer", "index": 91, "name": "utm_source_c", "comment": null}, "utm_campaign_c": {"type": "integer", "index": 92, "name": "utm_campaign_c", "comment": null}, "utm_content_c": {"type": "integer", "index": 93, "name": "utm_content_c", "comment": null}, "utm_term_c": {"type": "integer", "index": 94, "name": "utm_term_c", "comment": null}, "act_on_lead_score_c": {"type": "integer", "index": 95, "name": "act_on_lead_score_c", "comment": null}, "cbit_created_by_clearbit_c": {"type": "boolean", "index": 96, "name": "cbit_created_by_clearbit_c", "comment": null}, "fivetran_user_id_c": {"type": "integer", "index": 97, "name": "fivetran_user_id_c", "comment": null}, "geo_state_acton_c": {"type": "integer", "index": 98, "name": "geo_state_acton_c", "comment": null}, "actoncountry_c": {"type": "integer", "index": 99, "name": "actoncountry_c", "comment": null}, "actoncity_c": {"type": "integer", "index": 100, "name": "actoncity_c", "comment": null}, "actoncountrycode_c": {"type": "integer", "index": 101, "name": "actoncountrycode_c", "comment": null}, "actonpostalcode_c": {"type": "integer", "index": 102, "name": "actonpostalcode_c", "comment": null}, "actonreferrer_c": {"type": "integer", "index": 103, "name": "actonreferrer_c", "comment": null}, "actonstate_c": {"type": "integer", "index": 104, "name": "actonstate_c", "comment": null}, "geo_city_c": {"type": "integer", "index": 105, "name": "geo_city_c", "comment": null}, "geo_country_c": {"type": "integer", "index": 106, "name": "geo_country_c", "comment": null}, "geo_country_code_c": {"type": "integer", "index": 107, "name": "geo_country_code_c", "comment": null}, "geo_postal_code_c": {"type": "integer", "index": 108, "name": "geo_postal_code_c", "comment": null}, "geo_state_c": {"type": "integer", "index": 109, "name": "geo_state_c", "comment": null}, "company_type_c": {"type": "integer", "index": 110, "name": "company_type_c", "comment": null}, "pi_campaign_c": {"type": "integer", "index": 111, "name": "pi_campaign_c", "comment": null}, "pi_comments_c": {"type": "integer", "index": 112, "name": "pi_comments_c", "comment": null}, "pi_conversion_date_c": {"type": "integer", "index": 113, "name": "pi_conversion_date_c", "comment": null}, "pi_conversion_object_name_c": {"type": "integer", "index": 114, "name": "pi_conversion_object_name_c", "comment": null}, "pi_conversion_object_type_c": {"type": "integer", "index": 115, "name": "pi_conversion_object_type_c", "comment": null}, "pi_created_date_c": {"type": "integer", "index": 116, "name": "pi_created_date_c", "comment": null}, "pi_first_activity_c": {"type": "integer", "index": 117, "name": "pi_first_activity_c", "comment": null}, "pi_first_search_term_c": {"type": "integer", "index": 118, "name": "pi_first_search_term_c", "comment": null}, "pi_first_search_type_c": {"type": "integer", "index": 119, "name": "pi_first_search_type_c", "comment": null}, "pi_first_touch_url_c": {"type": "integer", "index": 120, "name": "pi_first_touch_url_c", "comment": null}, "pi_grade_c": {"type": "integer", "index": 121, "name": "pi_grade_c", "comment": null}, "pi_last_activity_c": {"type": "integer", "index": 122, "name": "pi_last_activity_c", "comment": null}, "pi_needs_score_synced_c": {"type": "integer", "index": 123, "name": "pi_needs_score_synced_c", "comment": null}, "pi_notes_c": {"type": "integer", "index": 124, "name": "pi_notes_c", "comment": null}, "pi_pardot_hard_bounced_c": {"type": "integer", "index": 125, "name": "pi_pardot_hard_bounced_c", "comment": null}, "pi_pardot_last_scored_at_c": {"type": "integer", "index": 126, "name": "pi_pardot_last_scored_at_c", "comment": null}, "pi_score_c": {"type": "integer", "index": 127, "name": "pi_score_c", "comment": null}, "pi_url_c": {"type": "integer", "index": 128, "name": "pi_url_c", "comment": null}, "pi_utm_campaign_c": {"type": "integer", "index": 129, "name": "pi_utm_campaign_c", "comment": null}, "pi_utm_content_c": {"type": "integer", "index": 130, "name": "pi_utm_content_c", "comment": null}, "pi_utm_medium_c": {"type": "integer", "index": 131, "name": "pi_utm_medium_c", "comment": null}, "pi_utm_source_c": {"type": "integer", "index": 132, "name": "pi_utm_source_c", "comment": null}, "pi_utm_term_c": {"type": "integer", "index": 133, "name": "pi_utm_term_c", "comment": null}, "fax": {"type": "integer", "index": 134, "name": "fax", "comment": null}, "region_c": {"type": "integer", "index": 135, "name": "region_c", "comment": null}, "competitor_c": {"type": "boolean", "index": 136, "name": "competitor_c", "comment": null}, "source_detail_c": {"type": "integer", "index": 137, "name": "source_detail_c", "comment": null}, "fivetran_account_stage_c": {"type": "integer", "index": 138, "name": "fivetran_account_stage_c", "comment": null}, "fivetran_account_id_c": {"type": "integer", "index": 139, "name": "fivetran_account_id_c", "comment": null}, "lean_data_router_status_c": {"type": "integer", "index": 140, "name": "lean_data_router_status_c", "comment": null}, "lean_data_matched_lead_c": {"type": "integer", "index": 141, "name": "lean_data_matched_lead_c", "comment": null}, "lean_data_routing_action_c": {"type": "text", "index": 142, "name": "lean_data_routing_action_c", "comment": null}, "lean_data_search_index_c": {"type": "text", "index": 143, "name": "lean_data_search_index_c", "comment": null}, "lean_data_reporting_matched_account_c": {"type": "text", "index": 144, "name": "lean_data_reporting_matched_account_c", "comment": null}, "lean_data_reporting_timestamp_c": {"type": "timestamp without time zone", "index": 145, "name": "lean_data_reporting_timestamp_c", "comment": null}, "lean_data_ld_segment_c": {"type": "integer", "index": 146, "name": "lean_data_ld_segment_c", "comment": null}, "lean_data_marketing_sys_created_date_c": {"type": "integer", "index": 147, "name": "lean_data_marketing_sys_created_date_c", "comment": null}, "lean_data_matched_account_c": {"type": "integer", "index": 148, "name": "lean_data_matched_account_c", "comment": null}, "lean_data_a_2_b_account_c": {"type": "integer", "index": 149, "name": "lean_data_a_2_b_account_c", "comment": null}, "lean_data_search_c": {"type": "integer", "index": 150, "name": "lean_data_search_c", "comment": null}, "lean_data_routing_status_c": {"type": "text", "index": 151, "name": "lean_data_routing_status_c", "comment": null}, "lean_data_a_2_b_group_c": {"type": "integer", "index": 152, "name": "lean_data_a_2_b_group_c", "comment": null}, "lean_data_matched_buyer_persona_c": {"type": "integer", "index": 153, "name": "lean_data_matched_buyer_persona_c", "comment": null}, "lean_data_tag_c": {"type": "integer", "index": 154, "name": "lean_data_tag_c", "comment": null}, "lean_data_status_info_c": {"type": "integer", "index": 155, "name": "lean_data_status_info_c", "comment": null}, "lean_data_modified_score_c": {"type": "integer", "index": 156, "name": "lean_data_modified_score_c", "comment": null}, "do_not_route_lead_c": {"type": "boolean", "index": 157, "name": "do_not_route_lead_c", "comment": null}, "partner_type_c": {"type": "integer", "index": 158, "name": "partner_type_c", "comment": null}, "allbound_id_c": {"type": "integer", "index": 159, "name": "allbound_id_c", "comment": null}, "lid_linked_in_company_id_c": {"type": "integer", "index": 160, "name": "lid_linked_in_company_id_c", "comment": null}, "lid_linked_in_member_token_c": {"type": "integer", "index": 161, "name": "lid_linked_in_member_token_c", "comment": null}, "lean_data_re_route_c": {"type": "integer", "index": 162, "name": "lean_data_re_route_c", "comment": null}, "sales_loft_1_most_recent_cadence_next_step_due_date_c": {"type": "integer", "index": 163, "name": "sales_loft_1_most_recent_cadence_next_step_due_date_c", "comment": null}, "sales_loft_1_most_recent_last_completed_step_c": {"type": "integer", "index": 164, "name": "sales_loft_1_most_recent_last_completed_step_c", "comment": null}, "sales_loft_1_most_recent_cadence_name_c": {"type": "integer", "index": 165, "name": "sales_loft_1_most_recent_cadence_name_c", "comment": null}, "network_c": {"type": "integer", "index": 166, "name": "network_c", "comment": null}, "matchtype_c": {"type": "integer", "index": 167, "name": "matchtype_c", "comment": null}, "device_c": {"type": "integer", "index": 168, "name": "device_c", "comment": null}, "creative_c": {"type": "integer", "index": 169, "name": "creative_c", "comment": null}, "adgroupid_c": {"type": "integer", "index": 170, "name": "adgroupid_c", "comment": null}, "keyword_c": {"type": "integer", "index": 171, "name": "keyword_c", "comment": null}, "campaignid_c": {"type": "integer", "index": 172, "name": "campaignid_c", "comment": null}, "partner_rep_email_c": {"type": "integer", "index": 173, "name": "partner_rep_email_c", "comment": null}, "partner_rep_name_c": {"type": "integer", "index": 174, "name": "partner_rep_name_c", "comment": null}, "lead_type_c": {"type": "integer", "index": 175, "name": "lead_type_c", "comment": null}, "contact_stage_c": {"type": "text", "index": 176, "name": "contact_stage_c", "comment": null}, "original_utm_campaign_c": {"type": "integer", "index": 177, "name": "original_utm_campaign_c", "comment": null}, "original_utm_content_c": {"type": "integer", "index": 178, "name": "original_utm_content_c", "comment": null}, "original_utm_medium_c": {"type": "integer", "index": 179, "name": "original_utm_medium_c", "comment": null}, "original_utm_source_c": {"type": "integer", "index": 180, "name": "original_utm_source_c", "comment": null}, "original_utm_term_c": {"type": "integer", "index": 181, "name": "original_utm_term_c", "comment": null}, "es_app_esalexa_rank_c": {"type": "integer", "index": 182, "name": "es_app_esalexa_rank_c", "comment": null}, "es_app_esaudience_names_c": {"type": "integer", "index": 183, "name": "es_app_esaudience_names_c", "comment": null}, "es_app_escity_c": {"type": "integer", "index": 184, "name": "es_app_escity_c", "comment": null}, "es_app_escompany_phone_c": {"type": "integer", "index": 185, "name": "es_app_escompany_phone_c", "comment": null}, "es_app_escountry_c": {"type": "integer", "index": 186, "name": "es_app_escountry_c", "comment": null}, "es_app_escreated_timestamp_c": {"type": "integer", "index": 187, "name": "es_app_escreated_timestamp_c", "comment": null}, "es_app_esecid_c": {"type": "integer", "index": 188, "name": "es_app_esecid_c", "comment": null}, "es_app_esemployees_c": {"type": "integer", "index": 189, "name": "es_app_esemployees_c", "comment": null}, "es_app_esenriched_c": {"type": "integer", "index": 190, "name": "es_app_esenriched_c", "comment": null}, "es_app_esenriched_timestamp_c": {"type": "integer", "index": 191, "name": "es_app_esenriched_timestamp_c", "comment": null}, "es_app_esfacebook_c": {"type": "integer", "index": 192, "name": "es_app_esfacebook_c", "comment": null}, "es_app_esindustry_c": {"type": "integer", "index": 193, "name": "es_app_esindustry_c", "comment": null}, "es_app_esintent_aggregate_score_c": {"type": "integer", "index": 194, "name": "es_app_esintent_aggregate_score_c", "comment": null}, "es_app_esintent_timestamp_c": {"type": "integer", "index": 195, "name": "es_app_esintent_timestamp_c", "comment": null}, "es_app_esintent_topics_c": {"type": "integer", "index": 196, "name": "es_app_esintent_topics_c", "comment": null}, "es_app_eskeywords_c": {"type": "integer", "index": 197, "name": "es_app_eskeywords_c", "comment": null}, "es_app_eslinked_in_c": {"type": "integer", "index": 198, "name": "es_app_eslinked_in_c", "comment": null}, "es_app_esoverall_fit_score_c": {"type": "integer", "index": 199, "name": "es_app_esoverall_fit_score_c", "comment": null}, "es_app_esrevenue_c": {"type": "integer", "index": 200, "name": "es_app_esrevenue_c", "comment": null}, "es_app_essource_c": {"type": "integer", "index": 201, "name": "es_app_essource_c", "comment": null}, "es_app_esstate_c": {"type": "integer", "index": 202, "name": "es_app_esstate_c", "comment": null}, "es_app_esstreet_c": {"type": "integer", "index": 203, "name": "es_app_esstreet_c", "comment": null}, "es_app_estechnologies_c": {"type": "integer", "index": 204, "name": "es_app_estechnologies_c", "comment": null}, "es_app_estwitter_c": {"type": "integer", "index": 205, "name": "es_app_estwitter_c", "comment": null}, "es_app_eszipcode_c": {"type": "integer", "index": 206, "name": "es_app_eszipcode_c", "comment": null}, "marketing_prospect_routing_rules_c": {"type": "boolean", "index": 207, "name": "marketing_prospect_routing_rules_c", "comment": null}, "individual_id": {"type": "integer", "index": 208, "name": "individual_id", "comment": null}, "marketing_process_c": {"type": "integer", "index": 209, "name": "marketing_process_c", "comment": null}, "automation_tracking_c": {"type": "integer", "index": 210, "name": "automation_tracking_c", "comment": null}, "user_gems_has_changed_job_c": {"type": "integer", "index": 211, "name": "user_gems_has_changed_job_c", "comment": null}, "user_gems_linked_in_c": {"type": "integer", "index": 212, "name": "user_gems_linked_in_c", "comment": null}, "email_opt_in_c": {"type": "integer", "index": 213, "name": "email_opt_in_c", "comment": null}, "email_opt_in_explicit_c": {"type": "boolean", "index": 214, "name": "email_opt_in_explicit_c", "comment": null}, "email_opt_in_implicit_c": {"type": "boolean", "index": 215, "name": "email_opt_in_implicit_c", "comment": null}, "gdpr_opt_in_explicit_c": {"type": "boolean", "index": 216, "name": "gdpr_opt_in_explicit_c", "comment": null}, "user_gems_is_a_user_gem_c": {"type": "boolean", "index": 217, "name": "user_gems_is_a_user_gem_c", "comment": null}, "user_gems_past_account_c": {"type": "integer", "index": 218, "name": "user_gems_past_account_c", "comment": null}, "user_gems_past_company_c": {"type": "integer", "index": 219, "name": "user_gems_past_company_c", "comment": null}, "user_gems_past_contact_c": {"type": "integer", "index": 220, "name": "user_gems_past_contact_c", "comment": null}, "user_gems_past_title_c": {"type": "integer", "index": 221, "name": "user_gems_past_title_c", "comment": null}, "promotion_id_c": {"type": "integer", "index": 222, "name": "promotion_id_c", "comment": null}, "previous_customer_c": {"type": "integer", "index": 223, "name": "previous_customer_c", "comment": null}, "referral_contact_email_c": {"type": "integer", "index": 224, "name": "referral_contact_email_c", "comment": null}, "referral_firstname_c": {"type": "integer", "index": 225, "name": "referral_firstname_c", "comment": null}, "referral_last_name_c": {"type": "integer", "index": 226, "name": "referral_last_name_c", "comment": null}, "mkto_71_lead_score_c": {"type": "integer", "index": 227, "name": "mkto_71_lead_score_c", "comment": null}, "mkto_71_acquisition_date_c": {"type": "integer", "index": 228, "name": "mkto_71_acquisition_date_c", "comment": null}, "mkto_71_acquisition_program_id_c": {"type": "integer", "index": 229, "name": "mkto_71_acquisition_program_id_c", "comment": null}, "mkto_acquisition_program_c": {"type": "integer", "index": 230, "name": "mkto_acquisition_program_c", "comment": null}, "mkto_71_inferred_city_c": {"type": "integer", "index": 231, "name": "mkto_71_inferred_city_c", "comment": null}, "mkto_71_inferred_company_c": {"type": "integer", "index": 232, "name": "mkto_71_inferred_company_c", "comment": null}, "mkto_71_inferred_country_c": {"type": "integer", "index": 233, "name": "mkto_71_inferred_country_c", "comment": null}, "mkto_71_inferred_metropolitan_area_c": {"type": "integer", "index": 234, "name": "mkto_71_inferred_metropolitan_area_c", "comment": null}, "mkto_71_inferred_phone_area_code_c": {"type": "integer", "index": 235, "name": "mkto_71_inferred_phone_area_code_c", "comment": null}, "mkto_71_inferred_postal_code_c": {"type": "integer", "index": 236, "name": "mkto_71_inferred_postal_code_c", "comment": null}, "mkto_71_inferred_state_region_c": {"type": "integer", "index": 237, "name": "mkto_71_inferred_state_region_c", "comment": null}, "mkto_71_original_referrer_c": {"type": "integer", "index": 238, "name": "mkto_71_original_referrer_c", "comment": null}, "mkto_71_original_search_engine_c": {"type": "integer", "index": 239, "name": "mkto_71_original_search_engine_c", "comment": null}, "mkto_71_original_search_phrase_c": {"type": "integer", "index": 240, "name": "mkto_71_original_search_phrase_c", "comment": null}, "mkto_71_original_source_info_c": {"type": "integer", "index": 241, "name": "mkto_71_original_source_info_c", "comment": null}, "mkto_71_original_source_type_c": {"type": "integer", "index": 242, "name": "mkto_71_original_source_type_c", "comment": null}, "mkto_si_hide_date_c": {"type": "integer", "index": 243, "name": "mkto_si_hide_date_c", "comment": null}, "mkto_si_last_interesting_moment_date_c": {"type": "timestamp without time zone", "index": 244, "name": "mkto_si_last_interesting_moment_date_c", "comment": null}, "mkto_si_last_interesting_moment_desc_c": {"type": "text", "index": 245, "name": "mkto_si_last_interesting_moment_desc_c", "comment": null}, "mkto_si_last_interesting_moment_source_c": {"type": "text", "index": 246, "name": "mkto_si_last_interesting_moment_source_c", "comment": null}, "mkto_si_last_interesting_moment_type_c": {"type": "text", "index": 247, "name": "mkto_si_last_interesting_moment_type_c", "comment": null}, "mkto_si_msicontact_id_c": {"type": "integer", "index": 248, "name": "mkto_si_msicontact_id_c", "comment": null}, "mkto_si_priority_c": {"type": "integer", "index": 249, "name": "mkto_si_priority_c", "comment": null}, "mkto_si_relative_score_value_c": {"type": "integer", "index": 250, "name": "mkto_si_relative_score_value_c", "comment": null}, "mkto_si_urgency_value_c": {"type": "integer", "index": 251, "name": "mkto_si_urgency_value_c", "comment": null}, "cloudingo_agent_ar_c": {"type": "integer", "index": 252, "name": "cloudingo_agent_ar_c", "comment": null}, "cloudingo_agent_ardi_c": {"type": "integer", "index": 253, "name": "cloudingo_agent_ardi_c", "comment": null}, "cloudingo_agent_as_c": {"type": "integer", "index": 254, "name": "cloudingo_agent_as_c", "comment": null}, "cloudingo_agent_atz_c": {"type": "integer", "index": 255, "name": "cloudingo_agent_atz_c", "comment": null}, "cloudingo_agent_av_c": {"type": "integer", "index": 256, "name": "cloudingo_agent_av_c", "comment": null}, "cloudingo_agent_les_c": {"type": "integer", "index": 257, "name": "cloudingo_agent_les_c", "comment": null}, "do_not_sync_marketo_c": {"type": "boolean", "index": 258, "name": "do_not_sync_marketo_c", "comment": null}, "source_every_utm_campaign_c": {"type": "integer", "index": 259, "name": "source_every_utm_campaign_c", "comment": null}, "source_every_utm_content_c": {"type": "integer", "index": 260, "name": "source_every_utm_content_c", "comment": null}, "source_every_utm_medium_c": {"type": "integer", "index": 261, "name": "source_every_utm_medium_c", "comment": null}, "source_every_utm_source_c": {"type": "integer", "index": 262, "name": "source_every_utm_source_c", "comment": null}, "source_every_utm_term_c": {"type": "integer", "index": 263, "name": "source_every_utm_term_c", "comment": null}, "source_first_utm_campaign_c": {"type": "integer", "index": 264, "name": "source_first_utm_campaign_c", "comment": null}, "source_first_utm_content_c": {"type": "integer", "index": 265, "name": "source_first_utm_content_c", "comment": null}, "source_first_utm_medium_c": {"type": "integer", "index": 266, "name": "source_first_utm_medium_c", "comment": null}, "source_first_utm_source_c": {"type": "integer", "index": 267, "name": "source_first_utm_source_c", "comment": null}, "source_first_utm_term_c": {"type": "integer", "index": 268, "name": "source_first_utm_term_c", "comment": null}, "source_last_utm_campaign_c": {"type": "text", "index": 269, "name": "source_last_utm_campaign_c", "comment": null}, "source_last_utm_content_c": {"type": "text", "index": 270, "name": "source_last_utm_content_c", "comment": null}, "source_last_utm_medium_c": {"type": "text", "index": 271, "name": "source_last_utm_medium_c", "comment": null}, "source_last_utm_source_c": {"type": "text", "index": 272, "name": "source_last_utm_source_c", "comment": null}, "source_last_utm_term_c": {"type": "text", "index": 273, "name": "source_last_utm_term_c", "comment": null}, "direct_office_c": {"type": "integer", "index": 274, "name": "direct_office_c", "comment": null}, "city_c": {"type": "integer", "index": 275, "name": "city_c", "comment": null}, "country_c": {"type": "integer", "index": 276, "name": "country_c", "comment": null}, "state_c": {"type": "integer", "index": 277, "name": "state_c", "comment": null}, "source_first_lead_source_category_c": {"type": "integer", "index": 278, "name": "source_first_lead_source_category_c", "comment": null}, "source_last_lead_source_c": {"type": "integer", "index": 279, "name": "source_last_lead_source_c", "comment": null}, "source_last_lead_source_category_c": {"type": "integer", "index": 280, "name": "source_last_lead_source_category_c", "comment": null}, "source_last_lead_source_detail_c": {"type": "integer", "index": 281, "name": "source_last_lead_source_detail_c", "comment": null}, "source_every_lead_source_c": {"type": "integer", "index": 282, "name": "source_every_lead_source_c", "comment": null}, "source_every_lead_source_category_c": {"type": "integer", "index": 283, "name": "source_every_lead_source_category_c", "comment": null}, "source_every_lead_source_detail_c": {"type": "integer", "index": 284, "name": "source_every_lead_source_detail_c", "comment": null}, "source_first_lead_source_c": {"type": "integer", "index": 285, "name": "source_first_lead_source_c", "comment": null}, "source_first_lead_source_detail_c": {"type": "integer", "index": 286, "name": "source_first_lead_source_detail_c", "comment": null}, "behavioral_score_c": {"type": "integer", "index": 287, "name": "behavioral_score_c", "comment": null}, "demographic_score_c": {"type": "integer", "index": 288, "name": "demographic_score_c", "comment": null}, "drift_cql_c": {"type": "integer", "index": 289, "name": "drift_cql_c", "comment": null}, "unique_email_c": {"type": "integer", "index": 290, "name": "unique_email_c", "comment": null}, "is_emea_event_routing_c": {"type": "boolean", "index": 291, "name": "is_emea_event_routing_c", "comment": null}, "csi_code_c": {"type": "integer", "index": 292, "name": "csi_code_c", "comment": null}, "csi_description_c": {"type": "text", "index": 293, "name": "csi_description_c", "comment": null}, "converted_date_time_c": {"type": "timestamp without time zone", "index": 294, "name": "converted_date_time_c", "comment": null}, "lead_created_date_time_reporting_c": {"type": "timestamp without time zone", "index": 295, "name": "lead_created_date_time_reporting_c", "comment": null}, "lead_iq_country_c": {"type": "integer", "index": 296, "name": "lead_iq_country_c", "comment": null}, "lead_iq_employee_count_c": {"type": "integer", "index": 297, "name": "lead_iq_employee_count_c", "comment": null}, "lead_iq_employee_range_c": {"type": "integer", "index": 298, "name": "lead_iq_employee_range_c", "comment": null}, "lead_iq_state_c": {"type": "integer", "index": 299, "name": "lead_iq_state_c", "comment": null}, "lead_iq_zip_code_c": {"type": "integer", "index": 300, "name": "lead_iq_zip_code_c", "comment": null}, "zoominfo_country_c": {"type": "integer", "index": 301, "name": "zoominfo_country_c", "comment": null}, "zoominfo_employee_count_c": {"type": "integer", "index": 302, "name": "zoominfo_employee_count_c", "comment": null}, "zoominfo_state_c": {"type": "integer", "index": 303, "name": "zoominfo_state_c", "comment": null}, "zoominfo_technologies_c": {"type": "integer", "index": 304, "name": "zoominfo_technologies_c", "comment": null}, "zoominfo_zip_code_c": {"type": "integer", "index": 305, "name": "zoominfo_zip_code_c", "comment": null}, "attended_event_c": {"type": "boolean", "index": 306, "name": "attended_event_c", "comment": null}, "mql_date_c": {"type": "integer", "index": 307, "name": "mql_date_c", "comment": null}, "user_gems_user_gems_id_c": {"type": "integer", "index": 308, "name": "user_gems_user_gems_id_c", "comment": null}, "dozisf_zoom_info_company_id_c": {"type": "integer", "index": 309, "name": "dozisf_zoom_info_company_id_c", "comment": null}, "dozisf_zoom_info_first_updated_c": {"type": "integer", "index": 310, "name": "dozisf_zoom_info_first_updated_c", "comment": null}, "dozisf_zoom_info_id_c": {"type": "integer", "index": 311, "name": "dozisf_zoom_info_id_c", "comment": null}, "dozisf_zoom_info_last_updated_c": {"type": "integer", "index": 312, "name": "dozisf_zoom_info_last_updated_c", "comment": null}, "lean_data_manual_route_trigger_c": {"type": "boolean", "index": 313, "name": "lean_data_manual_route_trigger_c", "comment": null}, "first_mql_date_c": {"type": "integer", "index": 314, "name": "first_mql_date_c", "comment": null}, "fivetran_account_association_date_c": {"type": "integer", "index": 315, "name": "fivetran_account_association_date_c", "comment": null}, "fivetran_account_user_role_s_c": {"type": "integer", "index": 316, "name": "fivetran_account_user_role_s_c", "comment": null}, "mql_reason_c": {"type": "text", "index": 317, "name": "mql_reason_c", "comment": null}, "trial_contact_start_date_c": {"type": "integer", "index": 318, "name": "trial_contact_start_date_c", "comment": null}, "enrichment_request_c": {"type": "boolean", "index": 319, "name": "enrichment_request_c", "comment": null}, "meta_data_create_date_c": {"type": "timestamp without time zone", "index": 320, "name": "meta_data_create_date_c", "comment": null}, "clarus_date_c": {"type": "integer", "index": 321, "name": "clarus_date_c", "comment": null}, "clarus_editor_c": {"type": "integer", "index": 322, "name": "clarus_editor_c", "comment": null}, "clarus_notes_c": {"type": "integer", "index": 323, "name": "clarus_notes_c", "comment": null}, "clarus_project_c": {"type": "integer", "index": 324, "name": "clarus_project_c", "comment": null}, "clarus_status_c": {"type": "integer", "index": 325, "name": "clarus_status_c", "comment": null}, "marketing_connector_interest_c": {"type": "integer", "index": 326, "name": "marketing_connector_interest_c", "comment": null}, "recent_marketing_campaign_status_c": {"type": "integer", "index": 327, "name": "recent_marketing_campaign_status_c", "comment": null}, "salesloft_cadence_trigger_c": {"type": "integer", "index": 328, "name": "salesloft_cadence_trigger_c", "comment": null}, "datawarehouse_used_c": {"type": "integer", "index": 329, "name": "datawarehouse_used_c", "comment": null}, "contact_status_c": {"type": "integer", "index": 330, "name": "contact_status_c", "comment": null}, "leandata_contact_owner_override_c": {"type": "integer", "index": 331, "name": "leandata_contact_owner_override_c", "comment": null}, "potential_fivetran_use_case_c": {"type": "text", "index": 332, "name": "potential_fivetran_use_case_c", "comment": null}, "bizible_2_account_c": {"type": "integer", "index": 333, "name": "bizible_2_account_c", "comment": null}, "bizible_2_ad_campaign_name_ft_c": {"type": "integer", "index": 334, "name": "bizible_2_ad_campaign_name_ft_c", "comment": null}, "bizible_2_ad_campaign_name_lc_c": {"type": "integer", "index": 335, "name": "bizible_2_ad_campaign_name_lc_c", "comment": null}, "bizible_2_bizible_id_c": {"type": "integer", "index": 336, "name": "bizible_2_bizible_id_c", "comment": null}, "bizible_2_landing_page_ft_c": {"type": "integer", "index": 337, "name": "bizible_2_landing_page_ft_c", "comment": null}, "bizible_2_landing_page_lc_c": {"type": "integer", "index": 338, "name": "bizible_2_landing_page_lc_c", "comment": null}, "bizible_2_marketing_channel_ft_c": {"type": "integer", "index": 339, "name": "bizible_2_marketing_channel_ft_c", "comment": null}, "bizible_2_marketing_channel_lc_c": {"type": "integer", "index": 340, "name": "bizible_2_marketing_channel_lc_c", "comment": null}, "bizible_2_touchpoint_date_ft_c": {"type": "integer", "index": 341, "name": "bizible_2_touchpoint_date_ft_c", "comment": null}, "bizible_2_touchpoint_date_lc_c": {"type": "integer", "index": 342, "name": "bizible_2_touchpoint_date_lc_c", "comment": null}, "bizible_2_touchpoint_source_ft_c": {"type": "integer", "index": 343, "name": "bizible_2_touchpoint_source_ft_c", "comment": null}, "bizible_2_touchpoint_source_lc_c": {"type": "integer", "index": 344, "name": "bizible_2_touchpoint_source_lc_c", "comment": null}, "sales_email_opt_out_c": {"type": "boolean", "index": 345, "name": "sales_email_opt_out_c", "comment": null}, "sales_email_opt_out_date_time_c": {"type": "integer", "index": 346, "name": "sales_email_opt_out_date_time_c", "comment": null}, "bombora_app_bombora_surge_record_count_c": {"type": "integer", "index": 347, "name": "bombora_app_bombora_surge_record_count_c", "comment": null}, "bombora_app_bombora_last_date_time_updated_c": {"type": "integer", "index": 348, "name": "bombora_app_bombora_last_date_time_updated_c", "comment": null}, "bombora_app_bombora_total_composite_score_c": {"type": "integer", "index": 349, "name": "bombora_app_bombora_total_composite_score_c", "comment": null}, "linked_in_url_c": {"type": "integer", "index": 350, "name": "linked_in_url_c", "comment": null}, "beta_connector_interest_c": {"type": "integer", "index": 351, "name": "beta_connector_interest_c", "comment": null}, "user_gems_ug_past_infos_c": {"type": "integer", "index": 352, "name": "user_gems_ug_past_infos_c", "comment": null}, "user_gems_ug_current_infos_c": {"type": "integer", "index": 353, "name": "user_gems_ug_current_infos_c", "comment": null}, "user_gems_ug_created_by_ug_c": {"type": "boolean", "index": 354, "name": "user_gems_ug_created_by_ug_c", "comment": null}, "free_trial_email_confirmed_date_c": {"type": "integer", "index": 355, "name": "free_trial_email_confirmed_date_c", "comment": null}, "dnboptimizer_dn_bcontact_record_c": {"type": "integer", "index": 356, "name": "dnboptimizer_dn_bcontact_record_c", "comment": null}, "dnboptimizer_dn_bcompany_record_c": {"type": "integer", "index": 357, "name": "dnboptimizer_dn_bcompany_record_c", "comment": null}, "dnboptimizer_dnb_d_u_n_s_number_c": {"type": "integer", "index": 358, "name": "dnboptimizer_dnb_d_u_n_s_number_c", "comment": null}, "i_sell_oskey_id_c": {"type": "integer", "index": 359, "name": "i_sell_oskey_id_c", "comment": null}, "verified_c": {"type": "boolean", "index": 360, "name": "verified_c", "comment": null}, "email_opt_out_date_time_c": {"type": "integer", "index": 361, "name": "email_opt_out_date_time_c", "comment": null}, "pbf_startup_c": {"type": "integer", "index": 362, "name": "pbf_startup_c", "comment": null}, "pbf_startup_certify_eligibility_c": {"type": "boolean", "index": 363, "name": "pbf_startup_certify_eligibility_c", "comment": null}, "engagio_intent_minutes_last_30_days_c": {"type": "integer", "index": 364, "name": "engagio_intent_minutes_last_30_days_c", "comment": null}, "engagio_engagement_minutes_last_3_months_c": {"type": "integer", "index": 365, "name": "engagio_engagement_minutes_last_3_months_c", "comment": null}, "engagio_engagement_minutes_last_7_days_c": {"type": "integer", "index": 366, "name": "engagio_engagement_minutes_last_7_days_c", "comment": null}, "engagio_matched_account_c": {"type": "integer", "index": 367, "name": "engagio_matched_account_c", "comment": null}, "engagio_first_engagement_date_c": {"type": "integer", "index": 368, "name": "engagio_first_engagement_date_c", "comment": null}, "engagio_match_time_c": {"type": "integer", "index": 369, "name": "engagio_match_time_c", "comment": null}, "engagio_department_c": {"type": "integer", "index": 370, "name": "engagio_department_c", "comment": null}, "engagio_role_c": {"type": "integer", "index": 371, "name": "engagio_role_c", "comment": null}, "legacy_hvr_id_c": {"type": "integer", "index": 372, "name": "legacy_hvr_id_c", "comment": null}, "hvr_channel_c": {"type": "integer", "index": 373, "name": "hvr_channel_c", "comment": null}, "email_opt_in_double_c": {"type": "boolean", "index": 374, "name": "email_opt_in_double_c", "comment": null}, "phone_number_catch_all_c": {"type": "integer", "index": 375, "name": "phone_number_catch_all_c", "comment": null}, "contacts_domain_exists_c": {"type": "integer", "index": 376, "name": "contacts_domain_exists_c", "comment": null}, "utm_id_c": {"type": "integer", "index": 377, "name": "utm_id_c", "comment": null}, "source_every_utm_id_c": {"type": "integer", "index": 378, "name": "source_every_utm_id_c", "comment": null}, "source_last_utm_id_c": {"type": "integer", "index": 379, "name": "source_last_utm_id_c", "comment": null}, "source_first_utm_id_c": {"type": "integer", "index": 380, "name": "source_first_utm_id_c", "comment": null}, "do_not_sync_reason_marketo_c": {"type": "integer", "index": 381, "name": "do_not_sync_reason_marketo_c", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 382, "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.salesforce_source.salesforce.lead"}, "source.salesforce_source.salesforce.opportunity": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_opportunity_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"_fivetran_synced": {"type": "timestamp without time zone", "index": 1, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 2, "name": "account_id", "comment": null}, "amount": {"type": "double precision", "index": 3, "name": "amount", "comment": null}, "campaign_id": {"type": "integer", "index": 4, "name": "campaign_id", "comment": null}, "close_date": {"type": "timestamp without time zone", "index": 5, "name": "close_date", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 6, "name": "created_date", "comment": null}, "description": {"type": "integer", "index": 7, "name": "description", "comment": null}, "expected_revenue": {"type": "integer", "index": 8, "name": "expected_revenue", "comment": null}, "fiscal": {"type": "text", "index": 9, "name": "fiscal", "comment": null}, "fiscal_quarter": {"type": "integer", "index": 10, "name": "fiscal_quarter", "comment": null}, "fiscal_year": {"type": "integer", "index": 11, "name": "fiscal_year", "comment": null}, "forecast_category": {"type": "text", "index": 12, "name": "forecast_category", "comment": null}, "forecast_category_name": {"type": "text", "index": 13, "name": "forecast_category_name", "comment": null}, "has_open_activity": {"type": "boolean", "index": 14, "name": "has_open_activity", "comment": null}, "has_opportunity_line_item": {"type": "boolean", "index": 15, "name": "has_opportunity_line_item", "comment": null}, "has_overdue_task": {"type": "boolean", "index": 16, "name": "has_overdue_task", "comment": null}, "id": {"type": "text", "index": 17, "name": "id", "comment": null}, "is_closed": {"type": "boolean", "index": 18, "name": "is_closed", "comment": null}, "is_deleted": {"type": "boolean", "index": 19, "name": "is_deleted", "comment": null}, "is_excluded_from_territory_2_filter": {"type": "integer", "index": 20, "name": "is_excluded_from_territory_2_filter", "comment": null}, "is_won": {"type": "boolean", "index": 21, "name": "is_won", "comment": null}, "last_activity_date": {"type": "timestamp without time zone", "index": 22, "name": "last_activity_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 23, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 24, "name": "last_viewed_date", "comment": null}, "lead_source": {"type": "text", "index": 25, "name": "lead_source", "comment": null}, "name": {"type": "text", "index": 26, "name": "name", "comment": null}, "next_step": {"type": "integer", "index": 27, "name": "next_step", "comment": null}, "owner_id": {"type": "text", "index": 28, "name": "owner_id", "comment": null}, "pricebook_2_id": {"type": "text", "index": 29, "name": "pricebook_2_id", "comment": null}, "probability": {"type": "double precision", "index": 30, "name": "probability", "comment": null}, "record_type_id": {"type": "text", "index": 31, "name": "record_type_id", "comment": null}, "stage_name": {"type": "text", "index": 32, "name": "stage_name", "comment": null}, "synced_quote_id": {"type": "integer", "index": 33, "name": "synced_quote_id", "comment": null}, "territory_2_id": {"type": "integer", "index": 34, "name": "territory_2_id", "comment": null}, "type": {"type": "text", "index": 35, "name": "type", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 36, "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.salesforce_source.salesforce.opportunity"}, "source.salesforce_source.salesforce.opportunity_line_item": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_opportunity_line_item_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"product_2_id": {"type": "text", "index": 1, "name": "product_2_id", "comment": null}, "quantity": {"type": "integer", "index": 2, "name": "quantity", "comment": null}, "total_price": {"type": "double precision", "index": 3, "name": "total_price", "comment": null}, "description": {"type": "integer", "index": 4, "name": "description", "comment": null}, "discount": {"type": "integer", "index": 5, "name": "discount", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 6, "name": "last_modified_date", "comment": null}, "list_price": {"type": "integer", "index": 7, "name": "list_price", "comment": null}, "product_code": {"type": "text", "index": 8, "name": "product_code", "comment": null}, "unit_price": {"type": "double precision", "index": 9, "name": "unit_price", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 10, "name": "_fivetran_synced", "comment": null}, "is_deleted": {"type": "boolean", "index": 11, "name": "is_deleted", "comment": null}, "opportunity_id": {"type": "text", "index": 12, "name": "opportunity_id", "comment": null}, "last_modified_by_id": {"type": "text", "index": 13, "name": "last_modified_by_id", "comment": null}, "service_date": {"type": "timestamp without time zone", "index": 14, "name": "service_date", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 15, "name": "system_modstamp", "comment": null}, "name": {"type": "text", "index": 16, "name": "name", "comment": null}, "id": {"type": "text", "index": 17, "name": "id", "comment": null}, "created_by_id": {"type": "text", "index": 18, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 19, "name": "created_date", "comment": null}, "sort_order": {"type": "integer", "index": 20, "name": "sort_order", "comment": null}, "pricebook_entry_id": {"type": "text", "index": 21, "name": "pricebook_entry_id", "comment": null}, "one_saas_app_included_c": {"type": "integer", "index": 22, "name": "one_saas_app_included_c", "comment": null}, "one_saas_app_quantity_invoiced_c": {"type": "integer", "index": 23, "name": "one_saas_app_quantity_invoiced_c", "comment": null}, "one_saas_app_quantity_not_invoiced_c": {"type": "integer", "index": 24, "name": "one_saas_app_quantity_not_invoiced_c", "comment": null}, "has_quantity_schedule": {"type": "integer", "index": 25, "name": "has_quantity_schedule", "comment": null}, "has_revenue_schedule": {"type": "integer", "index": 26, "name": "has_revenue_schedule", "comment": null}, "has_schedule": {"type": "integer", "index": 27, "name": "has_schedule", "comment": null}, "event_volume_c": {"type": "integer", "index": 28, "name": "event_volume_c", "comment": null}, "roadmap_connections_c": {"type": "integer", "index": 29, "name": "roadmap_connections_c", "comment": null}, "row_volume_c": {"type": "integer", "index": 30, "name": "row_volume_c", "comment": null}, "months_c": {"type": "integer", "index": 31, "name": "months_c", "comment": null}, "netsuite_conn_term_contract_pricing_type_c": {"type": "integer", "index": 32, "name": "netsuite_conn_term_contract_pricing_type_c", "comment": null}, "netsuite_conn_discount_item_c": {"type": "integer", "index": 33, "name": "netsuite_conn_discount_item_c", "comment": null}, "netsuite_conn_user_entered_sales_price_c": {"type": "integer", "index": 34, "name": "netsuite_conn_user_entered_sales_price_c", "comment": null}, "netsuite_conn_item_category_c": {"type": "integer", "index": 35, "name": "netsuite_conn_item_category_c", "comment": null}, "netsuite_conn_terms_c": {"type": "integer", "index": 36, "name": "netsuite_conn_terms_c", "comment": null}, "netsuite_conn_net_suite_item_key_id_c": {"type": "integer", "index": 37, "name": "netsuite_conn_net_suite_item_key_id_c", "comment": null}, "netsuite_conn_pushed_from_net_suite_c": {"type": "boolean", "index": 38, "name": "netsuite_conn_pushed_from_net_suite_c", "comment": null}, "netsuite_conn_end_date_c": {"type": "integer", "index": 39, "name": "netsuite_conn_end_date_c", "comment": null}, "netsuite_conn_list_rate_c": {"type": "integer", "index": 40, "name": "netsuite_conn_list_rate_c", "comment": null}, "netsuite_conn_from_contract_item_id_c": {"type": "integer", "index": 41, "name": "netsuite_conn_from_contract_item_id_c", "comment": null}, "netsuite_conn_start_date_c": {"type": "integer", "index": 42, "name": "netsuite_conn_start_date_c", "comment": null}, "netsuite_conn_net_suite_item_id_import_c": {"type": "integer", "index": 43, "name": "netsuite_conn_net_suite_item_id_import_c", "comment": null}, "sbqq_parent_id_c": {"type": "text", "index": 44, "name": "sbqq_parent_id_c", "comment": null}, "sbqq_quote_line_c": {"type": "text", "index": 45, "name": "sbqq_quote_line_c", "comment": null}, "sbqq_subscription_type_c": {"type": "text", "index": 46, "name": "sbqq_subscription_type_c", "comment": null}, "product_family_c": {"type": "text", "index": 47, "name": "product_family_c", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 48, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 49, "name": "last_viewed_date", "comment": null}, "celigo_sfnsio_contract_item_id_c": {"type": "integer", "index": 50, "name": "celigo_sfnsio_contract_item_id_c", "comment": null}, "celigo_sfnsio_contract_term_c": {"type": "integer", "index": 51, "name": "celigo_sfnsio_contract_term_c", "comment": null}, "celigo_sfnsio_end_date_c": {"type": "integer", "index": 52, "name": "celigo_sfnsio_end_date_c", "comment": null}, "celigo_sfnsio_list_rate_c": {"type": "integer", "index": 53, "name": "celigo_sfnsio_list_rate_c", "comment": null}, "celigo_sfnsio_net_suite_line_id_c": {"type": "integer", "index": 54, "name": "celigo_sfnsio_net_suite_line_id_c", "comment": null}, "celigo_sfnsio_start_date_c": {"type": "integer", "index": 55, "name": "celigo_sfnsio_start_date_c", "comment": null}, "product_code_stamped_c": {"type": "integer", "index": 56, "name": "product_code_stamped_c", "comment": null}, "hvr_use_case_c": {"type": "boolean", "index": 57, "name": "hvr_use_case_c", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 58, "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.salesforce_source.salesforce.opportunity_line_item"}, "source.salesforce_source.salesforce.order": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_order_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"id": {"type": "text", "index": 1, "name": "id", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 2, "name": "_fivetran_synced", "comment": null}, "account_id": {"type": "text", "index": 3, "name": "account_id", "comment": null}, "activated_by_id": {"type": "text", "index": 4, "name": "activated_by_id", "comment": null}, "activated_date": {"type": "timestamp without time zone", "index": 5, "name": "activated_date", "comment": null}, "billing_city": {"type": "text", "index": 6, "name": "billing_city", "comment": null}, "billing_country": {"type": "text", "index": 7, "name": "billing_country", "comment": null}, "billing_country_code": {"type": "integer", "index": 8, "name": "billing_country_code", "comment": null}, "billing_geocode_accuracy": {"type": "integer", "index": 9, "name": "billing_geocode_accuracy", "comment": null}, "billing_latitude": {"type": "integer", "index": 10, "name": "billing_latitude", "comment": null}, "billing_longitude": {"type": "integer", "index": 11, "name": "billing_longitude", "comment": null}, "billing_postal_code": {"type": "text", "index": 12, "name": "billing_postal_code", "comment": null}, "billing_state": {"type": "text", "index": 13, "name": "billing_state", "comment": null}, "billing_state_code": {"type": "integer", "index": 14, "name": "billing_state_code", "comment": null}, "billing_street": {"type": "text", "index": 15, "name": "billing_street", "comment": null}, "company_authorized_by_id": {"type": "integer", "index": 16, "name": "company_authorized_by_id", "comment": null}, "contract_id": {"type": "integer", "index": 17, "name": "contract_id", "comment": null}, "created_by_id": {"type": "text", "index": 18, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 19, "name": "created_date", "comment": null}, "customer_authorized_by_id": {"type": "integer", "index": 20, "name": "customer_authorized_by_id", "comment": null}, "description": {"type": "integer", "index": 21, "name": "description", "comment": null}, "effective_date": {"type": "timestamp without time zone", "index": 22, "name": "effective_date", "comment": null}, "end_date": {"type": "timestamp without time zone", "index": 23, "name": "end_date", "comment": null}, "is_deleted": {"type": "boolean", "index": 24, "name": "is_deleted", "comment": null}, "is_reduction_order": {"type": "boolean", "index": 25, "name": "is_reduction_order", "comment": null}, "last_modified_by_id": {"type": "text", "index": 26, "name": "last_modified_by_id", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 27, "name": "last_modified_date", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 28, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 29, "name": "last_viewed_date", "comment": null}, "order_number": {"type": "integer", "index": 30, "name": "order_number", "comment": null}, "original_order_id": {"type": "integer", "index": 31, "name": "original_order_id", "comment": null}, "owner_id": {"type": "text", "index": 32, "name": "owner_id", "comment": null}, "pricebook_2_id": {"type": "text", "index": 33, "name": "pricebook_2_id", "comment": null}, "shipping_city": {"type": "text", "index": 34, "name": "shipping_city", "comment": null}, "shipping_country": {"type": "text", "index": 35, "name": "shipping_country", "comment": null}, "shipping_country_code": {"type": "integer", "index": 36, "name": "shipping_country_code", "comment": null}, "shipping_geocode_accuracy": {"type": "integer", "index": 37, "name": "shipping_geocode_accuracy", "comment": null}, "shipping_latitude": {"type": "integer", "index": 38, "name": "shipping_latitude", "comment": null}, "shipping_longitude": {"type": "integer", "index": 39, "name": "shipping_longitude", "comment": null}, "shipping_postal_code": {"type": "integer", "index": 40, "name": "shipping_postal_code", "comment": null}, "shipping_state": {"type": "text", "index": 41, "name": "shipping_state", "comment": null}, "shipping_state_code": {"type": "integer", "index": 42, "name": "shipping_state_code", "comment": null}, "shipping_street": {"type": "text", "index": 43, "name": "shipping_street", "comment": null}, "status": {"type": "text", "index": 44, "name": "status", "comment": null}, "status_code": {"type": "text", "index": 45, "name": "status_code", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 46, "name": "system_modstamp", "comment": null}, "total_amount": {"type": "double precision", "index": 47, "name": "total_amount", "comment": null}, "type": {"type": "text", "index": 48, "name": "type", "comment": null}, "netsuite_conn_celigo_update_c": {"type": "boolean", "index": 49, "name": "netsuite_conn_celigo_update_c", "comment": null}, "netsuite_conn_net_suite_id_c": {"type": "integer", "index": 50, "name": "netsuite_conn_net_suite_id_c", "comment": null}, "netsuite_conn_net_suite_sync_err_c": {"type": "integer", "index": 51, "name": "netsuite_conn_net_suite_sync_err_c", "comment": null}, "netsuite_conn_pushed_from_net_suite_c": {"type": "boolean", "index": 52, "name": "netsuite_conn_pushed_from_net_suite_c", "comment": null}, "netsuite_conn_opportunity_c": {"type": "integer", "index": 53, "name": "netsuite_conn_opportunity_c", "comment": null}, "netsuite_conn_net_suite_order_status_c": {"type": "text", "index": 54, "name": "netsuite_conn_net_suite_order_status_c", "comment": null}, "netsuite_conn_sync_in_progress_c": {"type": "boolean", "index": 55, "name": "netsuite_conn_sync_in_progress_c", "comment": null}, "netsuite_conn_tax_total_c": {"type": "integer", "index": 56, "name": "netsuite_conn_tax_total_c", "comment": null}, "netsuite_conn_tracking_numbers_c": {"type": "integer", "index": 57, "name": "netsuite_conn_tracking_numbers_c", "comment": null}, "netsuite_conn_push_to_net_suite_c": {"type": "boolean", "index": 58, "name": "netsuite_conn_push_to_net_suite_c", "comment": null}, "netsuite_conn_document_id_c": {"type": "integer", "index": 59, "name": "netsuite_conn_document_id_c", "comment": null}, "netsuite_conn_subtotal_c": {"type": "integer", "index": 60, "name": "netsuite_conn_subtotal_c", "comment": null}, "netsuite_conn_discount_total_c": {"type": "integer", "index": 61, "name": "netsuite_conn_discount_total_c", "comment": null}, "netsuite_conn_total_c": {"type": "integer", "index": 62, "name": "netsuite_conn_total_c", "comment": null}, "netsuite_conn_net_suite_order_date_c": {"type": "timestamp without time zone", "index": 63, "name": "netsuite_conn_net_suite_order_date_c", "comment": null}, "netsuite_conn_ship_date_c": {"type": "integer", "index": 64, "name": "netsuite_conn_ship_date_c", "comment": null}, "netsuite_conn_quote_c": {"type": "integer", "index": 65, "name": "netsuite_conn_quote_c", "comment": null}, "netsuite_conn_net_suite_order_number_c": {"type": "text", "index": 66, "name": "netsuite_conn_net_suite_order_number_c", "comment": null}, "sbqq_contracted_c": {"type": "boolean", "index": 67, "name": "sbqq_contracted_c", "comment": null}, "sbqq_contracting_method_c": {"type": "text", "index": 68, "name": "sbqq_contracting_method_c", "comment": null}, "sbqq_payment_term_c": {"type": "text", "index": 69, "name": "sbqq_payment_term_c", "comment": null}, "sbqq_price_calc_status_c": {"type": "text", "index": 70, "name": "sbqq_price_calc_status_c", "comment": null}, "sbqq_price_calc_status_message_c": {"type": "integer", "index": 71, "name": "sbqq_price_calc_status_message_c", "comment": null}, "sbqq_quote_c": {"type": "text", "index": 72, "name": "sbqq_quote_c", "comment": null}, "sbqq_renewal_term_c": {"type": "integer", "index": 73, "name": "sbqq_renewal_term_c", "comment": null}, "sbqq_renewal_uplift_rate_c": {"type": "integer", "index": 74, "name": "sbqq_renewal_uplift_rate_c", "comment": null}, "ava_sfcpq_ava_tax_message_c": {"type": "text", "index": 75, "name": "ava_sfcpq_ava_tax_message_c", "comment": null}, "ava_sfcpq_entity_use_code_c": {"type": "integer", "index": 76, "name": "ava_sfcpq_entity_use_code_c", "comment": null}, "ava_sfcpq_invoice_message_c": {"type": "integer", "index": 77, "name": "ava_sfcpq_invoice_message_c", "comment": null}, "ava_sfcpq_is_seller_importer_of_record_c": {"type": "boolean", "index": 78, "name": "ava_sfcpq_is_seller_importer_of_record_c", "comment": null}, "ava_sfcpq_order_calculate_tax_c": {"type": "boolean", "index": 79, "name": "ava_sfcpq_order_calculate_tax_c", "comment": null}, "ava_sfcpq_sales_tax_amount_c": {"type": "integer", "index": 80, "name": "ava_sfcpq_sales_tax_amount_c", "comment": null}, "blng_bill_now_c": {"type": "boolean", "index": 81, "name": "blng_bill_now_c", "comment": null}, "blng_billing_account_c": {"type": "text", "index": 82, "name": "blng_billing_account_c", "comment": null}, "blng_billing_day_of_month_c": {"type": "integer", "index": 83, "name": "blng_billing_day_of_month_c", "comment": null}, "blng_invoice_batch_c": {"type": "text", "index": 84, "name": "blng_invoice_batch_c", "comment": null}, "amendment_type_c": {"type": "integer", "index": 85, "name": "amendment_type_c", "comment": null}, "credit_summary_c": {"type": "text", "index": 86, "name": "credit_summary_c", "comment": null}, "evergreen_c": {"type": "boolean", "index": 87, "name": "evergreen_c", "comment": null}, "invoicing_type_c": {"type": "text", "index": 88, "name": "invoicing_type_c", "comment": null}, "legal_entity_c": {"type": "text", "index": 89, "name": "legal_entity_c", "comment": null}, "prepaid_billing_frequency_c": {"type": "text", "index": 90, "name": "prepaid_billing_frequency_c", "comment": null}, "prepaid_order_c": {"type": "boolean", "index": 91, "name": "prepaid_order_c", "comment": null}, "update_subscriptions_only_c": {"type": "boolean", "index": 92, "name": "update_subscriptions_only_c", "comment": null}, "order_auto_activated_c": {"type": "boolean", "index": 93, "name": "order_auto_activated_c", "comment": null}, "synced_to_net_suite_c": {"type": "boolean", "index": 94, "name": "synced_to_net_suite_c", "comment": null}, "purchase_order_number_c": {"type": "integer", "index": 95, "name": "purchase_order_number_c", "comment": null}, "celigo_sfnsio_discount_total_net_suite_c": {"type": "integer", "index": 96, "name": "celigo_sfnsio_discount_total_net_suite_c", "comment": null}, "celigo_sfnsio_net_suite_id_c": {"type": "integer", "index": 97, "name": "celigo_sfnsio_net_suite_id_c", "comment": null}, "celigo_sfnsio_net_suite_order_number_c": {"type": "text", "index": 98, "name": "celigo_sfnsio_net_suite_order_number_c", "comment": null}, "celigo_sfnsio_net_suite_order_status_c": {"type": "integer", "index": 99, "name": "celigo_sfnsio_net_suite_order_status_c", "comment": null}, "celigo_sfnsio_net_suite_record_c": {"type": "text", "index": 100, "name": "celigo_sfnsio_net_suite_record_c", "comment": null}, "celigo_sfnsio_ship_date_c": {"type": "integer", "index": 101, "name": "celigo_sfnsio_ship_date_c", "comment": null}, "celigo_sfnsio_skip_export_to_net_suite_c": {"type": "boolean", "index": 102, "name": "celigo_sfnsio_skip_export_to_net_suite_c", "comment": null}, "celigo_sfnsio_sub_total_net_suite_c": {"type": "integer", "index": 103, "name": "celigo_sfnsio_sub_total_net_suite_c", "comment": null}, "celigo_sfnsio_tax_total_net_suite_c": {"type": "integer", "index": 104, "name": "celigo_sfnsio_tax_total_net_suite_c", "comment": null}, "celigo_sfnsio_test_mode_record_c": {"type": "boolean", "index": 105, "name": "celigo_sfnsio_test_mode_record_c", "comment": null}, "celigo_sfnsio_total_net_suite_c": {"type": "integer", "index": 106, "name": "celigo_sfnsio_total_net_suite_c", "comment": null}, "amend_with_rollover_spend_type_c": {"type": "boolean", "index": 107, "name": "amend_with_rollover_spend_type_c", "comment": null}, "customer_spend_type_c": {"type": "integer", "index": 108, "name": "customer_spend_type_c", "comment": null}, "order_spend_type_c": {"type": "integer", "index": 109, "name": "order_spend_type_c", "comment": null}, "opportunity_id": {"type": "integer", "index": 110, "name": "opportunity_id", "comment": null}, "purchase_summary_c": {"type": "integer", "index": 111, "name": "purchase_summary_c", "comment": null}, "is_hvr_legacy_order_c": {"type": "integer", "index": 112, "name": "is_hvr_legacy_order_c", "comment": null}, "ironclad_workflow_c": {"type": "integer", "index": 113, "name": "ironclad_workflow_c", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 114, "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.salesforce_source.salesforce.order"}, "source.salesforce_source.salesforce.product_2": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_product_2_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"last_referenced_date": {"type": "timestamp without time zone", "index": 1, "name": "last_referenced_date", "comment": null}, "is_active": {"type": "boolean", "index": 2, "name": "is_active", "comment": null}, "description": {"type": "integer", "index": 3, "name": "description", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 4, "name": "last_modified_date", "comment": null}, "record_type_id": {"type": "text", "index": 5, "name": "record_type_id", "comment": null}, "product_code": {"type": "integer", "index": 6, "name": "product_code", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 7, "name": "_fivetran_synced", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 8, "name": "last_viewed_date", "comment": null}, "is_deleted": {"type": "boolean", "index": 9, "name": "is_deleted", "comment": null}, "last_modified_by_id": {"type": "text", "index": 10, "name": "last_modified_by_id", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 11, "name": "system_modstamp", "comment": null}, "name": {"type": "text", "index": 12, "name": "name", "comment": null}, "id": {"type": "text", "index": 13, "name": "id", "comment": null}, "created_by_id": {"type": "text", "index": 14, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 15, "name": "created_date", "comment": null}, "family": {"type": "text", "index": 16, "name": "family", "comment": null}, "max_volume_c": {"type": "integer", "index": 17, "name": "max_volume_c", "comment": null}, "min_volume_c": {"type": "integer", "index": 18, "name": "min_volume_c", "comment": null}, "request_name_c": {"type": "integer", "index": 19, "name": "request_name_c", "comment": null}, "default_quantity_c": {"type": "integer", "index": 20, "name": "default_quantity_c", "comment": null}, "account_c": {"type": "integer", "index": 21, "name": "account_c", "comment": null}, "related_product_c": {"type": "integer", "index": 22, "name": "related_product_c", "comment": null}, "picklist_value_c": {"type": "integer", "index": 23, "name": "picklist_value_c", "comment": null}, "as_input_c": {"type": "integer", "index": 24, "name": "as_input_c", "comment": null}, "as_output_c": {"type": "integer", "index": 25, "name": "as_output_c", "comment": null}, "status_c": {"type": "integer", "index": 26, "name": "status_c", "comment": null}, "number_of_quantity_installments": {"type": "integer", "index": 27, "name": "number_of_quantity_installments", "comment": null}, "number_of_revenue_installments": {"type": "integer", "index": 28, "name": "number_of_revenue_installments", "comment": null}, "quantity_installment_period": {"type": "integer", "index": 29, "name": "quantity_installment_period", "comment": null}, "quantity_schedule_type": {"type": "integer", "index": 30, "name": "quantity_schedule_type", "comment": null}, "revenue_installment_period": {"type": "integer", "index": 31, "name": "revenue_installment_period", "comment": null}, "revenue_schedule_type": {"type": "integer", "index": 32, "name": "revenue_schedule_type", "comment": null}, "connections_c": {"type": "integer", "index": 33, "name": "connections_c", "comment": null}, "event_volume_c": {"type": "integer", "index": 34, "name": "event_volume_c", "comment": null}, "roadmap_connections_c": {"type": "integer", "index": 35, "name": "roadmap_connections_c", "comment": null}, "row_volume_c": {"type": "integer", "index": 36, "name": "row_volume_c", "comment": null}, "display_url": {"type": "integer", "index": 37, "name": "display_url", "comment": null}, "external_data_source_id": {"type": "integer", "index": 38, "name": "external_data_source_id", "comment": null}, "external_id": {"type": "integer", "index": 39, "name": "external_id", "comment": null}, "quantity_unit_of_measure": {"type": "integer", "index": 40, "name": "quantity_unit_of_measure", "comment": null}, "stock_keeping_unit": {"type": "integer", "index": 41, "name": "stock_keeping_unit", "comment": null}, "features_c": {"type": "integer", "index": 42, "name": "features_c", "comment": null}, "tier_3_price_c": {"type": "integer", "index": 43, "name": "tier_3_price_c", "comment": null}, "tier_2_price_c": {"type": "integer", "index": 44, "name": "tier_2_price_c", "comment": null}, "tier_4_price_c": {"type": "integer", "index": 45, "name": "tier_4_price_c", "comment": null}, "tier_1_price_c": {"type": "integer", "index": 46, "name": "tier_1_price_c", "comment": null}, "netsuite_conn_sync_in_progress_c": {"type": "boolean", "index": 47, "name": "netsuite_conn_sync_in_progress_c", "comment": null}, "netsuite_conn_celigo_update_c": {"type": "boolean", "index": 48, "name": "netsuite_conn_celigo_update_c", "comment": null}, "netsuite_conn_term_contract_pricing_type_c": {"type": "integer", "index": 49, "name": "netsuite_conn_term_contract_pricing_type_c", "comment": null}, "netsuite_conn_net_suite_id_c": {"type": "integer", "index": 50, "name": "netsuite_conn_net_suite_id_c", "comment": null}, "netsuite_conn_net_suite_sync_err_c": {"type": "text", "index": 51, "name": "netsuite_conn_net_suite_sync_err_c", "comment": null}, "netsuite_conn_push_to_net_suite_c": {"type": "boolean", "index": 52, "name": "netsuite_conn_push_to_net_suite_c", "comment": null}, "netsuite_conn_item_category_c": {"type": "integer", "index": 53, "name": "netsuite_conn_item_category_c", "comment": null}, "netsuite_conn_net_suite_item_type_c": {"type": "text", "index": 54, "name": "netsuite_conn_net_suite_item_type_c", "comment": null}, "netsuite_conn_sub_type_c": {"type": "text", "index": 55, "name": "netsuite_conn_sub_type_c", "comment": null}, "is_new_c": {"type": "boolean", "index": 56, "name": "is_new_c", "comment": null}, "product_metadata_c": {"type": "integer", "index": 57, "name": "product_metadata_c", "comment": null}, "product_metadata_del_c": {"type": "integer", "index": 58, "name": "product_metadata_del_c", "comment": null}, "sbqq_asset_amendment_behavior_c": {"type": "text", "index": 59, "name": "sbqq_asset_amendment_behavior_c", "comment": null}, "sbqq_asset_conversion_c": {"type": "text", "index": 60, "name": "sbqq_asset_conversion_c", "comment": null}, "sbqq_batch_quantity_c": {"type": "integer", "index": 61, "name": "sbqq_batch_quantity_c", "comment": null}, "sbqq_billing_frequency_c": {"type": "text", "index": 62, "name": "sbqq_billing_frequency_c", "comment": null}, "sbqq_billing_type_c": {"type": "text", "index": 63, "name": "sbqq_billing_type_c", "comment": null}, "sbqq_block_pricing_field_c": {"type": "text", "index": 64, "name": "sbqq_block_pricing_field_c", "comment": null}, "sbqq_charge_type_c": {"type": "text", "index": 65, "name": "sbqq_charge_type_c", "comment": null}, "sbqq_component_c": {"type": "boolean", "index": 66, "name": "sbqq_component_c", "comment": null}, "sbqq_compound_discount_rate_c": {"type": "integer", "index": 67, "name": "sbqq_compound_discount_rate_c", "comment": null}, "sbqq_configuration_event_c": {"type": "integer", "index": 68, "name": "sbqq_configuration_event_c", "comment": null}, "sbqq_configuration_field_set_c": {"type": "integer", "index": 69, "name": "sbqq_configuration_field_set_c", "comment": null}, "sbqq_configuration_fields_c": {"type": "integer", "index": 70, "name": "sbqq_configuration_fields_c", "comment": null}, "sbqq_configuration_form_title_c": {"type": "integer", "index": 71, "name": "sbqq_configuration_form_title_c", "comment": null}, "sbqq_configuration_type_c": {"type": "integer", "index": 72, "name": "sbqq_configuration_type_c", "comment": null}, "sbqq_configuration_validator_c": {"type": "integer", "index": 73, "name": "sbqq_configuration_validator_c", "comment": null}, "sbqq_configured_code_pattern_c": {"type": "integer", "index": 74, "name": "sbqq_configured_code_pattern_c", "comment": null}, "sbqq_configured_description_pattern_c": {"type": "integer", "index": 75, "name": "sbqq_configured_description_pattern_c", "comment": null}, "sbqq_cost_editable_c": {"type": "boolean", "index": 76, "name": "sbqq_cost_editable_c", "comment": null}, "sbqq_cost_schedule_c": {"type": "integer", "index": 77, "name": "sbqq_cost_schedule_c", "comment": null}, "sbqq_custom_configuration_page_c": {"type": "integer", "index": 78, "name": "sbqq_custom_configuration_page_c", "comment": null}, "sbqq_custom_configuration_required_c": {"type": "boolean", "index": 79, "name": "sbqq_custom_configuration_required_c", "comment": null}, "sbqq_customer_community_availability_c": {"type": "integer", "index": 80, "name": "sbqq_customer_community_availability_c", "comment": null}, "sbqq_default_pricing_table_c": {"type": "integer", "index": 81, "name": "sbqq_default_pricing_table_c", "comment": null}, "sbqq_default_quantity_c": {"type": "integer", "index": 82, "name": "sbqq_default_quantity_c", "comment": null}, "sbqq_description_locked_c": {"type": "boolean", "index": 83, "name": "sbqq_description_locked_c", "comment": null}, "sbqq_discount_category_c": {"type": "integer", "index": 84, "name": "sbqq_discount_category_c", "comment": null}, "sbqq_discount_schedule_c": {"type": "integer", "index": 85, "name": "sbqq_discount_schedule_c", "comment": null}, "sbqq_dynamic_pricing_constraint_c": {"type": "integer", "index": 86, "name": "sbqq_dynamic_pricing_constraint_c", "comment": null}, "sbqq_exclude_from_maintenance_c": {"type": "boolean", "index": 87, "name": "sbqq_exclude_from_maintenance_c", "comment": null}, "sbqq_exclude_from_opportunity_c": {"type": "boolean", "index": 88, "name": "sbqq_exclude_from_opportunity_c", "comment": null}, "sbqq_externally_configurable_c": {"type": "boolean", "index": 89, "name": "sbqq_externally_configurable_c", "comment": null}, "sbqq_generate_contracted_price_c": {"type": "integer", "index": 90, "name": "sbqq_generate_contracted_price_c", "comment": null}, "sbqq_has_configuration_attributes_c": {"type": "boolean", "index": 91, "name": "sbqq_has_configuration_attributes_c", "comment": null}, "sbqq_has_consumption_schedule_c": {"type": "boolean", "index": 92, "name": "sbqq_has_consumption_schedule_c", "comment": null}, "sbqq_hidden_c": {"type": "boolean", "index": 93, "name": "sbqq_hidden_c", "comment": null}, "sbqq_hide_price_in_search_results_c": {"type": "boolean", "index": 94, "name": "sbqq_hide_price_in_search_results_c", "comment": null}, "sbqq_include_in_maintenance_c": {"type": "boolean", "index": 95, "name": "sbqq_include_in_maintenance_c", "comment": null}, "sbqq_new_quote_group_c": {"type": "boolean", "index": 96, "name": "sbqq_new_quote_group_c", "comment": null}, "sbqq_non_discountable_c": {"type": "boolean", "index": 97, "name": "sbqq_non_discountable_c", "comment": null}, "sbqq_non_partner_discountable_c": {"type": "boolean", "index": 98, "name": "sbqq_non_partner_discountable_c", "comment": null}, "sbqq_option_layout_c": {"type": "integer", "index": 99, "name": "sbqq_option_layout_c", "comment": null}, "sbqq_option_selection_method_c": {"type": "text", "index": 100, "name": "sbqq_option_selection_method_c", "comment": null}, "sbqq_optional_c": {"type": "boolean", "index": 101, "name": "sbqq_optional_c", "comment": null}, "sbqq_price_editable_c": {"type": "boolean", "index": 102, "name": "sbqq_price_editable_c", "comment": null}, "sbqq_pricing_method_c": {"type": "text", "index": 103, "name": "sbqq_pricing_method_c", "comment": null}, "sbqq_pricing_method_editable_c": {"type": "boolean", "index": 104, "name": "sbqq_pricing_method_editable_c", "comment": null}, "sbqq_product_picture_id_c": {"type": "integer", "index": 105, "name": "sbqq_product_picture_id_c", "comment": null}, "sbqq_quantity_editable_c": {"type": "boolean", "index": 106, "name": "sbqq_quantity_editable_c", "comment": null}, "sbqq_quantity_scale_c": {"type": "integer", "index": 107, "name": "sbqq_quantity_scale_c", "comment": null}, "sbqq_reconfiguration_disabled_c": {"type": "boolean", "index": 108, "name": "sbqq_reconfiguration_disabled_c", "comment": null}, "sbqq_renewal_product_c": {"type": "integer", "index": 109, "name": "sbqq_renewal_product_c", "comment": null}, "sbqq_sort_order_c": {"type": "integer", "index": 110, "name": "sbqq_sort_order_c", "comment": null}, "sbqq_specifications_c": {"type": "integer", "index": 111, "name": "sbqq_specifications_c", "comment": null}, "sbqq_subscription_base_c": {"type": "text", "index": 112, "name": "sbqq_subscription_base_c", "comment": null}, "sbqq_subscription_category_c": {"type": "integer", "index": 113, "name": "sbqq_subscription_category_c", "comment": null}, "sbqq_subscription_percent_c": {"type": "integer", "index": 114, "name": "sbqq_subscription_percent_c", "comment": null}, "sbqq_subscription_pricing_c": {"type": "text", "index": 115, "name": "sbqq_subscription_pricing_c", "comment": null}, "sbqq_subscription_target_c": {"type": "integer", "index": 116, "name": "sbqq_subscription_target_c", "comment": null}, "sbqq_subscription_term_c": {"type": "integer", "index": 117, "name": "sbqq_subscription_term_c", "comment": null}, "sbqq_subscription_type_c": {"type": "text", "index": 118, "name": "sbqq_subscription_type_c", "comment": null}, "sbqq_tax_code_c": {"type": "integer", "index": 119, "name": "sbqq_tax_code_c", "comment": null}, "sbqq_taxable_c": {"type": "boolean", "index": 120, "name": "sbqq_taxable_c", "comment": null}, "sbqq_term_discount_level_c": {"type": "integer", "index": 121, "name": "sbqq_term_discount_level_c", "comment": null}, "sbqq_term_discount_schedule_c": {"type": "integer", "index": 122, "name": "sbqq_term_discount_schedule_c", "comment": null}, "sbqq_upgrade_credit_c": {"type": "integer", "index": 123, "name": "sbqq_upgrade_credit_c", "comment": null}, "sbqq_upgrade_ratio_c": {"type": "integer", "index": 124, "name": "sbqq_upgrade_ratio_c", "comment": null}, "sbqq_upgrade_source_c": {"type": "integer", "index": 125, "name": "sbqq_upgrade_source_c", "comment": null}, "sbqq_upgrade_target_c": {"type": "integer", "index": 126, "name": "sbqq_upgrade_target_c", "comment": null}, "connector_type_c": {"type": "text", "index": 127, "name": "connector_type_c", "comment": null}, "pbf_pro_type_discount_c": {"type": "boolean", "index": 128, "name": "pbf_pro_type_discount_c", "comment": null}, "dimension_c": {"type": "text", "index": 129, "name": "dimension_c", "comment": null}, "connector_status_c": {"type": "text", "index": 130, "name": "connector_status_c", "comment": null}, "dimension_definition_c": {"type": "integer", "index": 131, "name": "dimension_definition_c", "comment": null}, "ava_sfcpq_tax_code_c": {"type": "integer", "index": 132, "name": "ava_sfcpq_tax_code_c", "comment": null}, "paid_consumption_c": {"type": "integer", "index": 133, "name": "paid_consumption_c", "comment": null}, "is_complimentary_c": {"type": "boolean", "index": 134, "name": "is_complimentary_c", "comment": null}, "product_external_id_c": {"type": "integer", "index": 135, "name": "product_external_id_c", "comment": null}, "blng_billing_rule_c": {"type": "text", "index": 136, "name": "blng_billing_rule_c", "comment": null}, "blng_revenue_recognition_rule_c": {"type": "text", "index": 137, "name": "blng_revenue_recognition_rule_c", "comment": null}, "blng_tax_rule_c": {"type": "text", "index": 138, "name": "blng_tax_rule_c", "comment": null}, "deployment_date_c": {"type": "integer", "index": 139, "name": "deployment_date_c", "comment": null}, "do_not_prorate_c": {"type": "boolean", "index": 140, "name": "do_not_prorate_c", "comment": null}, "celigo_sfnsio_netsuite_id_c": {"type": "integer", "index": 141, "name": "celigo_sfnsio_netsuite_id_c", "comment": null}, "sbqq_enable_large_configuration_c": {"type": "boolean", "index": 142, "name": "sbqq_enable_large_configuration_c", "comment": null}, "sbqq_pricing_guidance_c": {"type": "integer", "index": 143, "name": "sbqq_pricing_guidance_c", "comment": null}, "celigo_sfnsio_item_pricing_type_c": {"type": "integer", "index": 144, "name": "celigo_sfnsio_item_pricing_type_c", "comment": null}, "celigo_sfnsio_test_mode_record_c": {"type": "boolean", "index": 145, "name": "celigo_sfnsio_test_mode_record_c", "comment": null}, "celigo_sfnsio_celigo_last_modified_date_c": {"type": "timestamp without time zone", "index": 146, "name": "celigo_sfnsio_celigo_last_modified_date_c", "comment": null}, "celigo_sfnsio_net_suite_record_c": {"type": "integer", "index": 147, "name": "celigo_sfnsio_net_suite_record_c", "comment": null}, "celigo_sfnsio_skip_export_to_net_suite_c": {"type": "boolean", "index": 148, "name": "celigo_sfnsio_skip_export_to_net_suite_c", "comment": null}, "celigo_sfnsio_net_suite_item_type_c": {"type": "integer", "index": 149, "name": "celigo_sfnsio_net_suite_item_type_c", "comment": null}, "celigo_sfnsio_net_suite_id_c": {"type": "integer", "index": 150, "name": "celigo_sfnsio_net_suite_id_c", "comment": null}, "promo_code_c": {"type": "integer", "index": 151, "name": "promo_code_c", "comment": null}, "product_category_c": {"type": "integer", "index": 152, "name": "product_category_c", "comment": null}, "product_source_c": {"type": "integer", "index": 153, "name": "product_source_c", "comment": null}, "non_recurring_c": {"type": "boolean", "index": 154, "name": "non_recurring_c", "comment": null}, "is_archived": {"type": "boolean", "index": 155, "name": "is_archived", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 156, "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.salesforce_source.salesforce.product_2"}, "source.salesforce_source.salesforce.task": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_task_data", "database": "postgres", "comment": null, "owner": "pguser"}, "columns": {"referral_account_c": {"type": "integer", "index": 1, "name": "referral_account_c", "comment": null}, "who_id": {"type": "text", "index": 2, "name": "who_id", "comment": null}, "call_disposition": {"type": "integer", "index": 3, "name": "call_disposition", "comment": null}, "recurrence_day_of_month": {"type": "integer", "index": 4, "name": "recurrence_day_of_month", "comment": null}, "owner_id": {"type": "text", "index": 5, "name": "owner_id", "comment": null}, "recurrence_end_date_only": {"type": "timestamp without time zone", "index": 6, "name": "recurrence_end_date_only", "comment": null}, "subject": {"type": "text", "index": 7, "name": "subject", "comment": null}, "description": {"type": "text", "index": 8, "name": "description", "comment": null}, "last_modified_date": {"type": "timestamp without time zone", "index": 9, "name": "last_modified_date", "comment": null}, "recurrence_time_zone_sid_key": {"type": "integer", "index": 10, "name": "recurrence_time_zone_sid_key", "comment": null}, "is_recurrence": {"type": "boolean", "index": 11, "name": "is_recurrence", "comment": null}, "what_count": {"type": "integer", "index": 12, "name": "what_count", "comment": null}, "_fivetran_synced": {"type": "timestamp without time zone", "index": 13, "name": "_fivetran_synced", "comment": null}, "call_object": {"type": "integer", "index": 14, "name": "call_object", "comment": null}, "is_deleted": {"type": "boolean", "index": 15, "name": "is_deleted", "comment": null}, "recurrence_day_of_week_mask": {"type": "integer", "index": 16, "name": "recurrence_day_of_week_mask", "comment": null}, "last_modified_by_id": {"type": "text", "index": 17, "name": "last_modified_by_id", "comment": null}, "system_modstamp": {"type": "timestamp without time zone", "index": 18, "name": "system_modstamp", "comment": null}, "recurrence_regenerated_type": {"type": "integer", "index": 19, "name": "recurrence_regenerated_type", "comment": null}, "id": {"type": "text", "index": 20, "name": "id", "comment": null}, "recurrence_type": {"type": "integer", "index": 21, "name": "recurrence_type", "comment": null}, "reminder_date_time": {"type": "timestamp without time zone", "index": 22, "name": "reminder_date_time", "comment": null}, "call_type": {"type": "integer", "index": 23, "name": "call_type", "comment": null}, "is_high_priority": {"type": "boolean", "index": 24, "name": "is_high_priority", "comment": null}, "is_closed": {"type": "boolean", "index": 25, "name": "is_closed", "comment": null}, "recurrence_month_of_year": {"type": "integer", "index": 26, "name": "recurrence_month_of_year", "comment": null}, "is_reminder_set": {"type": "boolean", "index": 27, "name": "is_reminder_set", "comment": null}, "activity_date": {"type": "timestamp without time zone", "index": 28, "name": "activity_date", "comment": null}, "recurrence_instance": {"type": "integer", "index": 29, "name": "recurrence_instance", "comment": null}, "priority": {"type": "text", "index": 30, "name": "priority", "comment": null}, "recurrence_interval": {"type": "integer", "index": 31, "name": "recurrence_interval", "comment": null}, "who_count": {"type": "integer", "index": 32, "name": "who_count", "comment": null}, "recurrence_start_date_only": {"type": "timestamp without time zone", "index": 33, "name": "recurrence_start_date_only", "comment": null}, "account_id": {"type": "text", "index": 34, "name": "account_id", "comment": null}, "referral_contact_c": {"type": "integer", "index": 35, "name": "referral_contact_c", "comment": null}, "call_duration_in_seconds": {"type": "integer", "index": 36, "name": "call_duration_in_seconds", "comment": null}, "created_by_id": {"type": "text", "index": 37, "name": "created_by_id", "comment": null}, "created_date": {"type": "timestamp without time zone", "index": 38, "name": "created_date", "comment": null}, "recurrence_activity_id": {"type": "integer", "index": 39, "name": "recurrence_activity_id", "comment": null}, "what_id": {"type": "text", "index": 40, "name": "what_id", "comment": null}, "task_subtype": {"type": "text", "index": 41, "name": "task_subtype", "comment": null}, "status": {"type": "text", "index": 42, "name": "status", "comment": null}, "invitee_uuid_c": {"type": "integer", "index": 43, "name": "invitee_uuid_c", "comment": null}, "type": {"type": "text", "index": 44, "name": "type", "comment": null}, "no_show_c": {"type": "boolean", "index": 45, "name": "no_show_c", "comment": null}, "first_meeting_held_c": {"type": "integer", "index": 46, "name": "first_meeting_held_c", "comment": null}, "associated_sdr_c": {"type": "integer", "index": 47, "name": "associated_sdr_c", "comment": null}, "first_meeting_c": {"type": "integer", "index": 48, "name": "first_meeting_c", "comment": null}, "call_recording_c": {"type": "integer", "index": 49, "name": "call_recording_c", "comment": null}, "affectlayer_chorus_call_id_c": {"type": "integer", "index": 50, "name": "affectlayer_chorus_call_id_c", "comment": null}, "affectlayer_affect_layer_call_id_c": {"type": "integer", "index": 51, "name": "affectlayer_affect_layer_call_id_c", "comment": null}, "last_rep_activity_date_c": {"type": "integer", "index": 52, "name": "last_rep_activity_date_c", "comment": null}, "lid_url_c": {"type": "integer", "index": 53, "name": "lid_url_c", "comment": null}, "lid_date_sent_c": {"type": "integer", "index": 54, "name": "lid_date_sent_c", "comment": null}, "record_type_id": {"type": "text", "index": 55, "name": "record_type_id", "comment": null}, "sales_loft_step_id_c": {"type": "integer", "index": 56, "name": "sales_loft_step_id_c", "comment": null}, "sales_loft_step_name_c": {"type": "integer", "index": 57, "name": "sales_loft_step_name_c", "comment": null}, "sales_loft_step_type_c": {"type": "integer", "index": 58, "name": "sales_loft_step_type_c", "comment": null}, "sales_loft_email_template_id_c": {"type": "integer", "index": 59, "name": "sales_loft_email_template_id_c", "comment": null}, "sales_loft_external_identifier_c": {"type": "integer", "index": 60, "name": "sales_loft_external_identifier_c", "comment": null}, "sales_loft_cadence_id_c": {"type": "integer", "index": 61, "name": "sales_loft_cadence_id_c", "comment": null}, "sales_loft_clicked_count_c": {"type": "integer", "index": 62, "name": "sales_loft_clicked_count_c", "comment": null}, "sales_loft_cadence_name_c": {"type": "integer", "index": 63, "name": "sales_loft_cadence_name_c", "comment": null}, "sales_loft_reply_count_c": {"type": "integer", "index": 64, "name": "sales_loft_reply_count_c", "comment": null}, "call_disposition_c": {"type": "integer", "index": 65, "name": "call_disposition_c", "comment": null}, "sales_loft_email_template_title_c": {"type": "integer", "index": 66, "name": "sales_loft_email_template_title_c", "comment": null}, "sales_loft_step_day_new_c": {"type": "integer", "index": 67, "name": "sales_loft_step_day_new_c", "comment": null}, "call_disposition_2_c": {"type": "integer", "index": 68, "name": "call_disposition_2_c", "comment": null}, "sales_loft_viewed_count_c": {"type": "integer", "index": 69, "name": "sales_loft_viewed_count_c", "comment": null}, "sales_loft_1_sales_loft_step_day_c": {"type": "integer", "index": 70, "name": "sales_loft_1_sales_loft_step_day_c", "comment": null}, "sales_loft_1_sales_loft_clicked_count_c": {"type": "integer", "index": 71, "name": "sales_loft_1_sales_loft_clicked_count_c", "comment": null}, "sales_loft_1_sales_loft_view_count_c": {"type": "integer", "index": 72, "name": "sales_loft_1_sales_loft_view_count_c", "comment": null}, "sales_loft_1_call_disposition_c": {"type": "integer", "index": 73, "name": "sales_loft_1_call_disposition_c", "comment": null}, "sales_loft_1_sales_loft_replies_count_c": {"type": "integer", "index": 74, "name": "sales_loft_1_sales_loft_replies_count_c", "comment": null}, "sales_loft_1_sales_loft_cadence_name_c": {"type": "integer", "index": 75, "name": "sales_loft_1_sales_loft_cadence_name_c", "comment": null}, "sales_loft_1_call_sentiment_c": {"type": "integer", "index": 76, "name": "sales_loft_1_call_sentiment_c", "comment": null}, "sales_loft_1_sales_loft_email_template_title_c": {"type": "integer", "index": 77, "name": "sales_loft_1_sales_loft_email_template_title_c", "comment": null}, "completed_date_time": {"type": "timestamp without time zone", "index": 78, "name": "completed_date_time", "comment": null}, "is_a_co_sell_activity_c": {"type": "integer", "index": 79, "name": "is_a_co_sell_activity_c", "comment": null}, "partner_contact_c": {"type": "integer", "index": 80, "name": "partner_contact_c", "comment": null}, "co_selling_activity_c": {"type": "integer", "index": 81, "name": "co_selling_activity_c", "comment": null}, "description_c": {"type": "integer", "index": 82, "name": "description_c", "comment": null}, "co_sell_partner_account_c": {"type": "integer", "index": 83, "name": "co_sell_partner_account_c", "comment": null}, "campaign_c": {"type": "integer", "index": 84, "name": "campaign_c", "comment": null}, "partner_account_c": {"type": "integer", "index": 85, "name": "partner_account_c", "comment": null}, "topic_c": {"type": "integer", "index": 86, "name": "topic_c", "comment": null}, "event_name_c": {"type": "integer", "index": 87, "name": "event_name_c", "comment": null}, "attendance_number_c": {"type": "integer", "index": 88, "name": "attendance_number_c", "comment": null}, "partner_activity_type_c": {"type": "integer", "index": 89, "name": "partner_activity_type_c", "comment": null}, "proof_of_referral_c": {"type": "integer", "index": 90, "name": "proof_of_referral_c", "comment": null}, "how_did_you_bring_value_or_create_trust_c": {"type": "integer", "index": 91, "name": "how_did_you_bring_value_or_create_trust_c", "comment": null}, "how_did_you_bring_value_or_earn_trust_c": {"type": "integer", "index": 92, "name": "how_did_you_bring_value_or_earn_trust_c", "comment": null}, "duration_in_minutes_c": {"type": "integer", "index": 93, "name": "duration_in_minutes_c", "comment": null}, "vidyard_c": {"type": "boolean", "index": 94, "name": "vidyard_c", "comment": null}, "expected_payment_date_c": {"type": "integer", "index": 95, "name": "expected_payment_date_c", "comment": null}, "execute_collections_plan_activity_c": {"type": "boolean", "index": 96, "name": "execute_collections_plan_activity_c", "comment": null}, "collections_hold_c": {"type": "boolean", "index": 97, "name": "collections_hold_c", "comment": null}, "opportunity_c": {"type": "integer", "index": 98, "name": "opportunity_c", "comment": null}, "meeting_type_c": {"type": "text", "index": 99, "name": "meeting_type_c", "comment": null}, "meeting_name_c": {"type": "text", "index": 100, "name": "meeting_name_c", "comment": null}, "bizible_2_bizible_id_c": {"type": "integer", "index": 101, "name": "bizible_2_bizible_id_c", "comment": null}, "bizible_2_bizible_touchpoint_date_c": {"type": "integer", "index": 102, "name": "bizible_2_bizible_touchpoint_date_c", "comment": null}, "assigned_to_role_c": {"type": "text", "index": 103, "name": "assigned_to_role_c", "comment": null}, "assigned_to_name_c": {"type": "text", "index": 104, "name": "assigned_to_name_c", "comment": null}, "legacy_hvr_id_c": {"type": "integer", "index": 105, "name": "legacy_hvr_id_c", "comment": null}, "is_archived": {"type": "boolean", "index": 106, "name": "is_archived", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 107, "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.salesforce_source.salesforce.task"}, "source.salesforce_source.salesforce.user": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_user_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}, "about_me": {"type": "integer", "index": 3, "name": "about_me", "comment": null}, "account_id": {"type": "integer", "index": 4, "name": "account_id", "comment": null}, "alias": {"type": "text", "index": 5, "name": "alias", "comment": null}, "badge_text": {"type": "text", "index": 6, "name": "badge_text", "comment": null}, "banner_photo_url": {"type": "text", "index": 7, "name": "banner_photo_url", "comment": null}, "call_center_id": {"type": "integer", "index": 8, "name": "call_center_id", "comment": null}, "city": {"type": "integer", "index": 9, "name": "city", "comment": null}, "community_nickname": {"type": "text", "index": 10, "name": "community_nickname", "comment": null}, "company_name": {"type": "integer", "index": 11, "name": "company_name", "comment": null}, "contact_id": {"type": "integer", "index": 12, "name": "contact_id", "comment": null}, "country": {"type": "text", "index": 13, "name": "country", "comment": null}, "country_code": {"type": "text", "index": 14, "name": "country_code", "comment": null}, "default_group_notification_frequency": {"type": "text", "index": 15, "name": "default_group_notification_frequency", "comment": null}, "delegated_approver_id": {"type": "text", "index": 16, "name": "delegated_approver_id", "comment": null}, "department": {"type": "integer", "index": 17, "name": "department", "comment": null}, "digest_frequency": {"type": "text", "index": 18, "name": "digest_frequency", "comment": null}, "division": {"type": "integer", "index": 19, "name": "division", "comment": null}, "email": {"type": "text", "index": 20, "name": "email", "comment": null}, "email_encoding_key": {"type": "text", "index": 21, "name": "email_encoding_key", "comment": null}, "email_preferences_auto_bcc": {"type": "boolean", "index": 22, "name": "email_preferences_auto_bcc", "comment": null}, "employee_number": {"type": "integer", "index": 23, "name": "employee_number", "comment": null}, "extension": {"type": "integer", "index": 24, "name": "extension", "comment": null}, "fax": {"type": "integer", "index": 25, "name": "fax", "comment": null}, "federation_identifier": {"type": "integer", "index": 26, "name": "federation_identifier", "comment": null}, "first_name": {"type": "text", "index": 27, "name": "first_name", "comment": null}, "forecast_enabled": {"type": "boolean", "index": 28, "name": "forecast_enabled", "comment": null}, "full_photo_url": {"type": "text", "index": 29, "name": "full_photo_url", "comment": null}, "geocode_accuracy": {"type": "integer", "index": 30, "name": "geocode_accuracy", "comment": null}, "id": {"type": "text", "index": 31, "name": "id", "comment": null}, "individual_id": {"type": "integer", "index": 32, "name": "individual_id", "comment": null}, "is_active": {"type": "boolean", "index": 33, "name": "is_active", "comment": null}, "is_profile_photo_active": {"type": "boolean", "index": 34, "name": "is_profile_photo_active", "comment": null}, "language_locale_key": {"type": "text", "index": 35, "name": "language_locale_key", "comment": null}, "last_login_date": {"type": "timestamp without time zone", "index": 36, "name": "last_login_date", "comment": null}, "last_name": {"type": "text", "index": 37, "name": "last_name", "comment": null}, "last_referenced_date": {"type": "timestamp without time zone", "index": 38, "name": "last_referenced_date", "comment": null}, "last_viewed_date": {"type": "timestamp without time zone", "index": 39, "name": "last_viewed_date", "comment": null}, "latitude": {"type": "double precision", "index": 40, "name": "latitude", "comment": null}, "locale_sid_key": {"type": "text", "index": 41, "name": "locale_sid_key", "comment": null}, "longitude": {"type": "double precision", "index": 42, "name": "longitude", "comment": null}, "manager_id": {"type": "text", "index": 43, "name": "manager_id", "comment": null}, "medium_banner_photo_url": {"type": "text", "index": 44, "name": "medium_banner_photo_url", "comment": null}, "mobile_phone": {"type": "integer", "index": 45, "name": "mobile_phone", "comment": null}, "name": {"type": "text", "index": 46, "name": "name", "comment": null}, "offline_trial_expiration_date": {"type": "timestamp without time zone", "index": 47, "name": "offline_trial_expiration_date", "comment": null}, "phone": {"type": "text", "index": 48, "name": "phone", "comment": null}, "postal_code": {"type": "integer", "index": 49, "name": "postal_code", "comment": null}, "profile_id": {"type": "text", "index": 50, "name": "profile_id", "comment": null}, "receives_admin_info_emails": {"type": "boolean", "index": 51, "name": "receives_admin_info_emails", "comment": null}, "receives_info_emails": {"type": "boolean", "index": 52, "name": "receives_info_emails", "comment": null}, "sender_email": {"type": "integer", "index": 53, "name": "sender_email", "comment": null}, "sender_name": {"type": "integer", "index": 54, "name": "sender_name", "comment": null}, "signature": {"type": "integer", "index": 55, "name": "signature", "comment": null}, "small_banner_photo_url": {"type": "text", "index": 56, "name": "small_banner_photo_url", "comment": null}, "small_photo_url": {"type": "text", "index": 57, "name": "small_photo_url", "comment": null}, "state": {"type": "integer", "index": 58, "name": "state", "comment": null}, "state_code": {"type": "integer", "index": 59, "name": "state_code", "comment": null}, "street": {"type": "integer", "index": 60, "name": "street", "comment": null}, "time_zone_sid_key": {"type": "text", "index": 61, "name": "time_zone_sid_key", "comment": null}, "title": {"type": "text", "index": 62, "name": "title", "comment": null}, "user_role_id": {"type": "text", "index": 63, "name": "user_role_id", "comment": null}, "user_type": {"type": "text", "index": 64, "name": "user_type", "comment": null}, "username": {"type": "text", "index": 65, "name": "username", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 66, "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.salesforce_source.salesforce.user"}, "source.salesforce_source.salesforce.user_role": {"metadata": {"type": "BASE TABLE", "schema": "zz_dbt_catherine_sf", "name": "sf_user_role_data", "database": "postgres", "comment": null, "owner": "pguser"}, "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}, "case_access_for_account_owner": {"type": "text", "index": 3, "name": "case_access_for_account_owner", "comment": null}, "contact_access_for_account_owner": {"type": "text", "index": 4, "name": "contact_access_for_account_owner", "comment": null}, "developer_name": {"type": "text", "index": 5, "name": "developer_name", "comment": null}, "forecast_user_id": {"type": "integer", "index": 6, "name": "forecast_user_id", "comment": null}, "id": {"type": "text", "index": 7, "name": "id", "comment": null}, "may_forecast_manager_share": {"type": "boolean", "index": 8, "name": "may_forecast_manager_share", "comment": null}, "name": {"type": "text", "index": 9, "name": "name", "comment": null}, "opportunity_access_for_account_owner": {"type": "text", "index": 10, "name": "opportunity_access_for_account_owner", "comment": null}, "parent_role_id": {"type": "text", "index": 11, "name": "parent_role_id", "comment": null}, "portal_type": {"type": "text", "index": 12, "name": "portal_type", "comment": null}, "rollup_description": {"type": "text", "index": 13, "name": "rollup_description", "comment": null}, "_fivetran_active": {"type": "boolean", "index": 14, "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.salesforce_source.salesforce.user_role"}}, "errors": null} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 2bcc794..c580ce9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,30 +1,4 @@ - - - - - - - dbt Docs - - - - - - - - - - - - - - - - - -
icons
-
- - +e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,n){n(8).module("dbt").factory("locationService",["$state",function(e){var t={};return t.parseState=function(e){return function(e){return{selected:{include:e.g_i||"",exclude:e.g_e||""},show_graph:!!e.g_v}}(e)},t.setState=function(t){var n=function(e){var t={g_v:1};return t.g_i=e.include,t.g_e=e.exclude,t}(t),r=e.current.name;e.go(r,n)},t.clearState=function(){var t=e.current.name;e.go(t,{g_i:null,g_e:null,g_v:null})},t}])},function(e,t,n){"use strict";const r=n(8),i=n(202);r.module("dbt").controller("OverviewCtrl",["$scope","$state","project",function(e,t,n){e.overview_md="(loading)",n.ready((function(n){let r=t.params.project_name?t.params.project_name:null;var o=n.docs["doc.dbt.__overview__"],a=i.filter(n.docs,{name:"__overview__"});if(i.each(a,(function(e){"dbt"!=e.package_name&&(o=e)})),null!==r){o=n.docs[`doc.${r}.__${r}__`]||o;let e=i.filter(n.docs,{name:`__${r}__`});i.each(e,e=>{e.package_name!==r&&(o=e)})}e.overview_md=o.block_contents}))}])},function(e,t,n){"use strict";n(8).module("dbt").controller("SourceListCtrl",["$scope","$state","project",function(e,t,n){e.source=t.params.source,e.model={},e.extra_table_fields=[],e.has_more_info=function(e){return(e.description||"").length},e.toggle_source_expanded=function(t){e.has_more_info(t)&&(t.expanded=!t.expanded)},n.ready((function(t){var n=_.filter(t.nodes,(function(t){return t.source_name==e.source}));if(0!=n.length){n.sort((e,t)=>e.name.localeCompare(t.name));var r=n[0];e.model={name:e.source,source_description:r.source_description,sources:n};var i=_.uniq(_.map(n,"metadata.owner")),o=_.uniq(_.map(n,"database")),a=_.uniq(_.map(n,"schema"));e.extra_table_fields=[{name:"Loader",value:r.loader},{name:1==i.length?"Owner":"Owners",value:i.join(", ")},{name:1==o.length?"Database":"Databases",value:o.join(", ")},{name:1==a.length?"Schema":"Schemas",value:a.join(", ")},{name:"Tables",value:n.length}]}}))}])},function(e,t,n){const r=n(8),i={main:n(483),overview:n(484),graph:n(485),source:n(205),source_list:n(486),model:n(487),source:n(205),snapshot:n(488),seed:n(489),unit_test:n(490),test:n(491),analysis:n(492),macro:n(493),exposure:n(494),metric:n(495),semantic_model:n(496),saved_query:n(497),operation:n(498)};r.module("dbt").config(["$stateProvider","$urlRouterProvider",function(e,t){var n="g_v&g_i&g_e&g_p&g_n";t.otherwise("/overview"),e.state("dbt",{url:"/",abstract:!0,controller:"MainController",templateUrl:i.main}).state("dbt.overview",{url:"overview?"+n,controller:"OverviewCtrl",templateUrl:i.overview}).state("dbt.project_overview",{url:"overview/:project_name?"+n,controller:"OverviewCtrl",templateUrl:i.overview,params:{project_name:{type:"string"}}}).state("dbt.graph",{url:"graph",controller:"GraphCtrl",templateUrl:i.graph}).state("dbt.model",{url:"model/:unique_id?section&"+n,controller:"ModelCtrl",templateUrl:i.model,params:{unique_id:{type:"string"}}}).state("dbt.seed",{url:"seed/:unique_id?section&"+n,controller:"SeedCtrl",templateUrl:i.seed,params:{unique_id:{type:"string"}}}).state("dbt.snapshot",{url:"snapshot/:unique_id?section&"+n,controller:"SnapshotCtrl",templateUrl:i.snapshot,params:{unique_id:{type:"string"}}}).state("dbt.unit_test",{url:"unit_test/:unique_id?section&"+n,controller:"TestCtrl",templateUrl:i.unit_test,params:{unique_id:{type:"string"}}}).state("dbt.test",{url:"test/:unique_id?section&"+n,controller:"TestCtrl",templateUrl:i.test,params:{unique_id:{type:"string"}}}).state("dbt.analysis",{url:"analysis/:unique_id?section&"+n,controller:"AnalysisCtrl",templateUrl:i.analysis,params:{unique_id:{type:"string"}}}).state("dbt.source",{url:"source/:unique_id?section&"+n,controller:"SourceCtrl",templateUrl:i.source,params:{unique_id:{type:"string"}}}).state("dbt.source_list",{url:"source_list/:source?section&"+n,controller:"SourceListCtrl",templateUrl:i.source_list,params:{source:{type:"string"}}}).state("dbt.macro",{url:"macro/:unique_id?section",controller:"MacroCtrl",templateUrl:i.macro,params:{unique_id:{type:"string"}}}).state("dbt.exposure",{url:"exposure/:unique_id?section&"+n,controller:"ExposureCtrl",templateUrl:i.exposure,params:{unique_id:{type:"string"}}}).state("dbt.metric",{url:"metric/:unique_id?section&"+n,controller:"MetricCtrl",templateUrl:i.metric,params:{unique_id:{type:"string"}}}).state("dbt.semantic_model",{url:"semantic_model/:unique_id?section&"+n,controller:"SemanticModelCtrl",templateUrl:i.semantic_model,params:{unique_id:{type:"string"}}}).state("dbt.saved_query",{url:"saved_query/:unique_id?section&"+n,controller:"SavedQueryCtrl",templateUrl:i.saved_query,params:{unique_id:{type:"string"}}}).state("dbt.operation",{url:"operation/:unique_id?section&"+n,controller:"OperationCtrl",templateUrl:i.operation,params:{unique_id:{type:"string"}}})}])},function(e,t){var n="/main/main.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'\n\n
\n \n\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n
\n
\n')}]),e.exports=n},function(e,t){var n="/overview/overview.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'
\n \n
\n
\n

\n
\n
\n
\n\n')}]),e.exports=n},function(e,t){var n="/graph/graph.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'
\n
\n
\n
\n
\n
\n
\n')}]),e.exports=n},function(e,t){var n="/sources/source_list.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'\n\n
\n \n
\n
\n
\n
\n \n
\n\n
\n
\n
\n
Description
\n
\n
\n
\n
This {{ model.resource_type }} is not currently documented
\n
\n
\n
\n
\n\n\n
\n
\n
\n
Source Tables
\n
\n
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
SourceTableDescriptionLinkMore?
\n
\n {{ source.source_name }}\n
\n
\n {{ source.name }}

\n
\n {{ source.description }}\n \n View docs\n \n \n \n \n \n \n \n \n \n
\n
\n
\n
Description
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n')}]),e.exports=n},function(e,t){var n="/docs/model.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'\n\n
\n \n
\n
\n
\n
\n \n
\n\n
\n
\n
\n
Description
\n
\n
\n
\n
This {{ model.resource_type }} is not currently documented
\n
\n
\n
\n
\n\n
\n
\n
\n
Columns
\n \n
\n
\n\n
\n
\n
\n
Referenced By
\n \n
\n
\n\n
\n
\n
\n
Depends On
\n \n
\n
\n\n
\n
\n
\n \n
\n
\n
\n
\n
\n')}]),e.exports=n},function(e,t){var n="/docs/snapshot.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'\n\n
\n \n
\n
\n
\n
\n \n
\n\n
\n
\n
\n
Description
\n
\n
\n
\n
This {{ model.resource_type }} is not currently documented
\n
\n
\n
\n
\n\n
\n
\n
\n
Columns
\n \n
\n
\n\n
\n
\n
\n
Referenced By
\n \n
\n
\n\n
\n
\n
\n
Depends On
\n \n
\n
\n\n
\n
\n
\n \n
\n
\n
\n
\n
\n')}]),e.exports=n},function(e,t){var n="/docs/seed.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'\n\n
\n \n
\n
\n
\n
\n \n
\n\n
\n
\n
\n
Description
\n
\n
\n
\n
This {{ model.resource_type }} is not currently documented
\n
\n
\n
\n
\n
\n
\n
\n
Columns
\n \n
\n
\n\n
\n
\n
\n
Referenced By
\n \n
\n
\n\n
\n
\n
\n
Depends On
\n \n
\n
\n\n
\n
\n
\n \n
\n
\n
\n
\n
\n')}]),e.exports=n},function(e,t){var n="/docs/unit_test.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'\n\n
\n \n
\n
\n
\n
\n
\n
Description
\n
\n
\n
\n
This {{ model.resource_type }} is not currently documented
\n
\n
\n
\n
\n\n
\n
\n
\n
Depends On
\n \n
\n
\n\n
\n
\n
\n')}]),e.exports=n},function(e,t){var n="/docs/test.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'\n\n
\n \n
\n
\n
\n
\n
\n
Description
\n
\n
\n
\n
This {{ model.resource_type }} is not currently documented
\n
\n
\n
\n
\n\n
\n
\n
\n
Depends On
\n \n
\n
\n\n
\n
\n
\n \n
\n
\n
\n
\n
\n')}]),e.exports=n},function(e,t){var n="/docs/analysis.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'\n\n
\n \n
\n
\n\n
\n
\n
\n
Description
\n
\n
\n
\n
This {{ model.resource_type }} is not currently documented
\n
\n
\n
\n
\n\n
\n
\n
\n
Depends On
\n \n
\n
\n\n
\n
\n
\n \n
\n
\n
\n
\n
\n')}]),e.exports=n},function(e,t){var n="/docs/macro.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'\n\n
\n \n
\n
\n
\n
\n
\n
Description
\n
\n
\n
\n
This {{ macro.resource_type }} is not currently documented
\n
\n
\n
\n
\n\n
\n
\n
\n
Arguments
\n \n
\n
\n\n
\n
\n
\n
Referenced By
\n \n
\n
\n\n
\n
\n
\n
Depends On
\n \n
\n
\n\n
\n
\n
\n \n
\n
\n
\n
\n
\n')}]),e.exports=n},function(e,t){var n="/docs/exposure.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'\n\n
\n \n
\n
\n\n
\n
\n \n
\n\n
\n
\n
\n
Description
\n
\n
\n
\n
This {{ exposure.resource_type }} is not currently documented
\n
\n
\n
\n
\n\n
\n
\n
\n
Depends On
\n \n
\n
\n\n
\n
\n
\n')}]),e.exports=n},function(e,t){var n="/docs/metric.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'\n\n
\n \n
\n
\n\n
\n
\n \n
\n\n
\n
\n
\n
Description
\n
\n
\n
\n
This {{ metric.resource_type }} is not currently documented
\n
\n
\n
\n
\n\n
\n
\n
\n
Depends On
\n \n
\n
\n\n
\n
\n
\n')}]),e.exports=n},function(e,t){var n="/docs/semantic_model.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'\n\n
\n \n
\n
\n\n
\n
\n \n
\n\n
\n
\n
\n
Description
\n
\n
\n
\n
This {{ semantic_model.resource_type }} is not currently documented
\n
\n
\n
\n
\n\n
\n
\n
\n
Entities
\n\n
\n
\n
\n
\n
Name
\n
{{ entity.name }}
\n
None
\n
Type
\n
{{ entity.type }}
\n
None
\n
Expression
\n
{{ entity.expr }}
\n
None
\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n
Depends On
\n \n
\n
\n\n
\n
\n
\n')}]),e.exports=n},function(e,t){var n="/docs/saved_query.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'\n\n
\n \n
\n
\n\n
\n
\n \n
\n\n
\n
\n
\n
Description
\n
\n
\n
\n
This {{ saved_query.resource_type }} is not currently documented
\n
\n
\n
\n
\n\n
\n
\n
\n
Entities
\n\n
\n
\n
\n
\n
Name
\n
{{ entity.name }}
\n
None
\n
Type
\n
{{ entity.type }}
\n
None
\n
Expression
\n
{{ entity.expr }}
\n
None
\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n
Depends On
\n \n
\n
\n\n
\n
\n
')}]),e.exports=n},function(e,t){var n="/docs/operation.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(n,'\n\n
\n \n
\n
\n
\n
\n
\n
Description
\n
\n
\n
\n
This {{ model.resource_type }} is not currently documented
\n
\n
\n
\n
\n\n
\n
\n
\n
Depends On
\n \n
\n
\n\n
\n
\n
\n \n
\n
\n
\n
\n
\n')}]),e.exports=n}]); +//# sourceMappingURL=main.js.map diff --git a/docs/manifest.json b/docs/manifest.json index ab1b141..ddd7eb7 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -1 +1 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v10.json", "dbt_version": "1.6.3", "generated_at": "2023-10-30T18:30:44.946646Z", "invocation_id": "481200b0-f7e9-41c0-8b43-483f2b50ff1c", "env": {}, "project_name": "salesforce_source_integration_tests", "project_id": "263106cda4237bb52d7987f1581d49bb", "user_id": "81581f81-d5af-4143-8fbf-c2f0001e4f56", "send_anonymous_usage_stats": true, "adapter_type": "postgres"}, "nodes": {"seed.salesforce_source_integration_tests.sf_lead_data": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "sf_lead_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_lead_data.csv", "original_file_path": "seeds/sf_lead_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_lead_data", "fqn": ["salesforce_source_integration_tests", "sf_lead_data"], "alias": "sf_lead_data", "checksum": {"name": "sha256", "checksum": "83b59332e93f8f07839e1e573c09a9591084734387efc8783e3f51058ff5034b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "converted_date": "timestamp", "created_date": "timestamp", "email_bounced_date": "timestamp", "last_activity_date": "timestamp", "last_modified_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": true, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"converted_date": "timestamp", "created_date": "timestamp", "email_bounced_date": "timestamp", "last_activity_date": "timestamp", "last_modified_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}}, "created_at": 1698690621.4014442, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_lead_data\"", "raw_code": "", "root_path": "/Users/avinash.kunnath/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_product_2_data": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "sf_product_2_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_product_2_data.csv", "original_file_path": "seeds/sf_product_2_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_product_2_data", "fqn": ["salesforce_source_integration_tests", "sf_product_2_data"], "alias": "sf_product_2_data", "checksum": {"name": "sha256", "checksum": "a227b4c050e2eef218b1757e2cf7b282dcc022fb2a4e1d761fc48481e74c7230"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "created_date": "timestamp", "last_modified_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": true, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"created_date": "timestamp", "last_modified_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}}, "created_at": 1698690621.407396, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_product_2_data\"", "raw_code": "", "root_path": "/Users/avinash.kunnath/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_user_role_data": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "sf_user_role_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_user_role_data.csv", "original_file_path": "seeds/sf_user_role_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_user_role_data", "fqn": ["salesforce_source_integration_tests", "sf_user_role_data"], "alias": "sf_user_role_data", "checksum": {"name": "sha256", "checksum": "2f3861fe3fccbbfb3056beab2f7b6b159910bcf898cade04789a6be752bbf996"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": true, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp"}}, "created_at": 1698690621.408628, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_user_role_data\"", "raw_code": "", "root_path": "/Users/avinash.kunnath/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_account_data": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "sf_account_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_account_data.csv", "original_file_path": "seeds/sf_account_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_account_data", "fqn": ["salesforce_source_integration_tests", "sf_account_data"], "alias": "sf_account_data", "checksum": {"name": "sha256", "checksum": "50ebb7785eeb7b560b9c2199d9d0d3686080124b3a37bf571051ea54c6a3c5b4"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "last_activity_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "annual_revenue": "float", "billing_latitude": "float", "billing_longitude": "float", "shipping_latitude": "float", "shipping_longitude": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": true, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"last_activity_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "annual_revenue": "float", "billing_latitude": "float", "billing_longitude": "float", "shipping_latitude": "float", "shipping_longitude": "float"}}, "created_at": 1698690621.4098, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_account_data\"", "raw_code": "", "root_path": "/Users/avinash.kunnath/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_opportunity_line_item_data": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "sf_opportunity_line_item_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_opportunity_line_item_data.csv", "original_file_path": "seeds/sf_opportunity_line_item_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_opportunity_line_item_data", "fqn": ["salesforce_source_integration_tests", "sf_opportunity_line_item_data"], "alias": "sf_opportunity_line_item_data", "checksum": {"name": "sha256", "checksum": "da3d703e060791ee354dfe83830d026531816141846eda4837b517c5a34b0abd"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "created_date": "timestamp", "last_modified_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "service_date": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": true, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"created_date": "timestamp", "last_modified_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "service_date": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}}, "created_at": 1698690621.4109938, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_opportunity_line_item_data\"", "raw_code": "", "root_path": "/Users/avinash.kunnath/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_user_data": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "sf_user_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_user_data.csv", "original_file_path": "seeds/sf_user_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_user_data", "fqn": ["salesforce_source_integration_tests", "sf_user_data"], "alias": "sf_user_data", "checksum": {"name": "sha256", "checksum": "6ca1169abd0988ebf457e230d077fb22c32404626864575d9b87bd9745cc7a55"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "last_login_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "offline_trial_expiration_date": "timestamp", "latitude": "float", "longitude": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": true, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"last_login_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "offline_trial_expiration_date": "timestamp", "latitude": "float", "longitude": "float"}}, "created_at": 1698690621.4123101, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_user_data\"", "raw_code": "", "root_path": "/Users/avinash.kunnath/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_contact_data": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "sf_contact_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_contact_data.csv", "original_file_path": "seeds/sf_contact_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_contact_data", "fqn": ["salesforce_source_integration_tests", "sf_contact_data"], "alias": "sf_contact_data", "checksum": {"name": "sha256", "checksum": "e4b8953b2e16533efb7c0bb9f246f64d5b9fad22ed16fb2d65629a02524b78d0"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "birthdate": "timestamp", "created_date": "timestamp", "email_bounced_date": "timestamp", "last_activity_date": "timestamp", "last_curequest_date": "timestamp", "last_cuupdate_date": "timestamp", "last_modified_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": true, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"birthdate": "timestamp", "created_date": "timestamp", "email_bounced_date": "timestamp", "last_activity_date": "timestamp", "last_curequest_date": "timestamp", "last_cuupdate_date": "timestamp", "last_modified_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}}, "created_at": 1698690621.4134898, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_contact_data\"", "raw_code": "", "root_path": "/Users/avinash.kunnath/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_opportunity_data": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "sf_opportunity_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_opportunity_data.csv", "original_file_path": "seeds/sf_opportunity_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_opportunity_data", "fqn": ["salesforce_source_integration_tests", "sf_opportunity_data"], "alias": "sf_opportunity_data", "checksum": {"name": "sha256", "checksum": "6a109616a284522a02550d21119c0257d788a33d01b2ded463808a467266873a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "close_date": "timestamp", "created_date": "timestamp", "last_activity_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "amount": "float", "probability": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": true, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"close_date": "timestamp", "created_date": "timestamp", "last_activity_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "amount": "float", "probability": "float"}}, "created_at": 1698690621.414667, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_opportunity_data\"", "raw_code": "", "root_path": "/Users/avinash.kunnath/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_opportunity_history_data": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "sf_opportunity_history_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_opportunity_history_data.csv", "original_file_path": "seeds/sf_opportunity_history_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_opportunity_history_data", "fqn": ["salesforce_source_integration_tests", "sf_opportunity_history_data"], "alias": "sf_opportunity_history_data", "checksum": {"name": "sha256", "checksum": "a28441bbd95128aa6440a32b8faec0a21cec1f6e3eae8ff804ba2bdcb499381f"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "close_date": "timestamp", "created_date": "timestamp", "last_activity_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "amount": "float", "expected_revenue": "float", "is_deleted": "boolean"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": true, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"close_date": "timestamp", "created_date": "timestamp", "last_activity_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "amount": "float", "expected_revenue": "float", "is_deleted": "boolean"}}, "created_at": 1698690621.4160159, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_opportunity_history_data\"", "raw_code": "", "root_path": "/Users/avinash.kunnath/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_order_data": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "sf_order_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_order_data.csv", "original_file_path": "seeds/sf_order_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_order_data", "fqn": ["salesforce_source_integration_tests", "sf_order_data"], "alias": "sf_order_data", "checksum": {"name": "sha256", "checksum": "4cf8cc6e6eb58e8e502f3204fd430468b1c63e35766c56f2fd3029a6988f06f4"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "activated_date": "timestamp", "created_date": "timestamp", "effective_date": "timestamp", "end_date": "timestamp", "last_modified_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": true, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"activated_date": "timestamp", "created_date": "timestamp", "effective_date": "timestamp", "end_date": "timestamp", "last_modified_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}}, "created_at": 1698690621.417181, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_order_data\"", "raw_code": "", "root_path": "/Users/avinash.kunnath/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_event_data": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "sf_event_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_event_data.csv", "original_file_path": "seeds/sf_event_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_event_data", "fqn": ["salesforce_source_integration_tests", "sf_event_data"], "alias": "sf_event_data", "checksum": {"name": "sha256", "checksum": "7dc5596105508d36674a5019e42592dd7cc48391842da432c7d02f46b63f820a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "activity_date": "timestamp", "activity_date_time": "timestamp", "created_date": "timestamp", "end_date": "timestamp", "end_date_time": "timestamp", "last_modified_date": "timestamp", "recurrence_2_pattern_start_date": "timestamp", "recurrence_end_date_only": "timestamp", "recurrence_start_date_time": "timestamp", "reminder_date_time": "timestamp", "start_date_time": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": true, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"activity_date": "timestamp", "activity_date_time": "timestamp", "created_date": "timestamp", "end_date": "timestamp", "end_date_time": "timestamp", "last_modified_date": "timestamp", "recurrence_2_pattern_start_date": "timestamp", "recurrence_end_date_only": "timestamp", "recurrence_start_date_time": "timestamp", "reminder_date_time": "timestamp", "start_date_time": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}}, "created_at": 1698690621.4183428, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_event_data\"", "raw_code": "", "root_path": "/Users/avinash.kunnath/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_contact_history_data": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "sf_contact_history_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_contact_history_data.csv", "original_file_path": "seeds/sf_contact_history_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_contact_history_data", "fqn": ["salesforce_source_integration_tests", "sf_contact_history_data"], "alias": "sf_contact_history_data", "checksum": {"name": "sha256", "checksum": "2a872395946af58b6d08eb9be088c1ca2f2e9ffe0b224c3bbcd92086ad2e6507"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "birthdate": "timestamp", "last_activity_date": "timestamp", "last_modified_date": "timestamp", "last_viewed_date": "timestamp", "is_deleted": "boolean"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": true, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"birthdate": "timestamp", "last_activity_date": "timestamp", "last_modified_date": "timestamp", "last_viewed_date": "timestamp", "is_deleted": "boolean"}}, "created_at": 1698690621.4195058, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_contact_history_data\"", "raw_code": "", "root_path": "/Users/avinash.kunnath/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_account_history_data": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "sf_account_history_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_account_history_data.csv", "original_file_path": "seeds/sf_account_history_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_account_history_data", "fqn": ["salesforce_source_integration_tests", "sf_account_history_data"], "alias": "sf_account_history_data", "checksum": {"name": "sha256", "checksum": "e19660a78e56a685df80329bfbcf71324f09a2d5a421540f5fa34cd23d740dcb"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "annual_revenue": "float", "last_activity_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "is_deleted": "boolean"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": true, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"annual_revenue": "float", "last_activity_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "is_deleted": "boolean"}}, "created_at": 1698690621.4207911, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_account_history_data\"", "raw_code": "", "root_path": "/Users/avinash.kunnath/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_task_data": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "sf_task_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_task_data.csv", "original_file_path": "seeds/sf_task_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_task_data", "fqn": ["salesforce_source_integration_tests", "sf_task_data"], "alias": "sf_task_data", "checksum": {"name": "sha256", "checksum": "b885e6f9737a8e1695c90c0dbbcfbbf3d4849bf3bbc7aba808b44c6d8eac772c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "activity_date": "timestamp", "completed_date_time": "timestamp", "created_date": "timestamp", "last_modified_date": "timestamp", "recurrence_end_date_only": "timestamp", "recurrence_start_date_only": "timestamp", "reminder_date_time": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "quote_columns": true, "post-hook": [], "pre-hook": []}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"activity_date": "timestamp", "completed_date_time": "timestamp", "created_date": "timestamp", "last_modified_date": "timestamp", "recurrence_end_date_only": "timestamp", "recurrence_start_date_only": "timestamp", "reminder_date_time": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}}, "created_at": 1698690621.421949, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_task_data\"", "raw_code": "", "root_path": "/Users/avinash.kunnath/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "model.salesforce_source.stg_salesforce__opportunity_history": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__opportunity_history", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce_history/stg_salesforce__opportunity_history.sql", "original_file_path": "models/salesforce_history/stg_salesforce__opportunity_history.sql", "unique_id": "model.salesforce_source.stg_salesforce__opportunity_history", "fqn": ["salesforce_source", "salesforce_history", "stg_salesforce__opportunity_history"], "alias": "stg_salesforce__opportunity_history", "checksum": {"name": "sha256", "checksum": "cedc11f02f20dbf84230c35bffecadd658b05c6e7bec647507865b762661e6d7"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "history_unique_key", "on_schema_change": "fail", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "partition_by": {"field": "_fivetran_date", "data_type": "date"}, "file_format": "parquet", "post-hook": [], "pre-hook": []}, "tags": [], "description": "Represents historical records of opportunities, which are sales or pending deals.", "columns": {"opportunity_id": {"name": "opportunity_id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "true if it is the currently active record. false if it is a historical version of the record. Only one version of the record can be true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_start": {"name": "_fivetran_start", "description": "The time when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The time until which the record was active minus epsilon, where epsilon is the smallest time difference that can be stored in the timestamp type value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_date": {"name": "_fivetran_date", "description": "The date when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "history_unique_key": {"name": "history_unique_key", "description": "Surrogate key hashed on `_fivetran_start` and `opportunity_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "ID of the account associated with this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "amount": {"name": "amount", "description": "Estimated total sale amount. For opportunities with products, the amount is the sum of the related products.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "ID of a related Campaign. This field is defined only for those organizations that have the campaign feature Campaigns enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "close_date": {"name": "close_date", "description": "Required. Date when the opportunity is expected to close.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Date when the opportunity is was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_description": {"name": "opportunity_description", "description": "Text description of the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "expected_revenue": {"name": "expected_revenue", "description": "Read-only field that is equal to the product of the opportunity Amount field and the Probability.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal": {"name": "fiscal", "description": "If fiscal years are not enabled, the name of the fiscal quarter or period in which the opportunity CloseDate falls.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal_quarter": {"name": "fiscal_quarter", "description": "Represents the fiscal quarter. Valid values are 1, 2, 3, or 4.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal_year": {"name": "fiscal_year", "description": "Represents the fiscal year, for example, 2006.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_category": {"name": "forecast_category", "description": "Restricted picklist field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_category_name": {"name": "forecast_category_name", "description": "The name of the forecast category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_open_activity": {"name": "has_open_activity", "description": "Indicates whether an opportunity has an open event or task (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_opportunity_line_item": {"name": "has_opportunity_line_item", "description": "Read-only field that indicates whether the opportunity has associated line items. A value of true means that Opportunity line items have been created for the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_overdue_task": {"name": "has_overdue_task", "description": "Indicates whether an opportunity has an overdue task (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_closed": {"name": "is_closed", "description": "True, if Stage Name Label is Closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_won": {"name": "is_won", "description": "True, if Stage Name Label is Won.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is one of the following, whichever is the most recent:Due date of the most recent event logged against the record or Due date of the most recently closed task associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_source": {"name": "lead_source", "description": "Source of this opportunity, such as Advertisement or Trade Show.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_name": {"name": "opportunity_name", "description": "Required. A name for this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "next_step": {"name": "next_step", "description": "Description of next task in closing opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "ID of the User who has been assigned to work this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "probability": {"name": "probability", "description": "Percentage of estimated confidence in closing the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "stage_name": {"name": "stage_name", "description": "Required. Current stage of this record. The StageName field controls several other fields on an opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "synced_quote_id": {"name": "synced_quote_id", "description": "The ID of the Quote that syncs with the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of opportunity. For example, Existing Business or New Business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce_history/stg_salesforce_history.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "enabled": true, "unique_key": "history_unique_key", "incremental_strategy": "delete+insert", "partition_by": {"field": "_fivetran_date", "data_type": "date"}, "file_format": "parquet", "on_schema_change": "fail"}, "created_at": 1698690621.766901, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__opportunity_history\"", "raw_code": "{{ config(\n enabled=var('salesforce__opportunity_history_enabled', False),\n materialized='incremental',\n unique_key='history_unique_key',\n incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert',\n partition_by={\n \"field\": \"_fivetran_date\", \n \"data_type\": \"date\"\n } if target.type not in ('spark','databricks') else ['_fivetran_date'],\n file_format='parquet',\n on_schema_change='fail'\n ) \n}}\n\nwith base as (\n\n select * \n from {{ source('salesforce_history','opportunity') }}\n {% if is_incremental() %}\n where cast(_fivetran_start as {{ dbt.type_timestamp() }}) >= (select max(cast((_fivetran_start) as {{ dbt.type_timestamp() }})) from {{ this }} )\n {% else %}\n {% if var('global_history_start_date',[]) or var('opportunity_history_start_date',[]) %}\n where cast(_fivetran_start as {{ dbt.type_timestamp() }}) >= \n {% if var('opportunity_history_start_date', []) %}\n \"{{ var('opportunity_history_start_date') }}\"\n {% else %}\n \"{{ var('global_history_start_date') }}\"\n {% endif %}\n {% endif %}\n {% endif %} \n),\n\nfinal as (\n\n select \n id as opportunity_id,\n cast(_fivetran_start as {{ dbt.type_timestamp() }}) as _fivetran_start,\n cast(_fivetran_end as {{ dbt.type_timestamp() }}) as _fivetran_end,\n cast(_fivetran_start as date) as _fivetran_date,\n {{ dbt_utils.generate_surrogate_key(['id', '_fivetran_start']) }} as history_unique_key,\n\n {{ dbt_utils.star(from=source('salesforce_history','opportunity'),\n except=[\"id\", \"_fivetran_start\", \"_fivetran_end\"]) }}\n from base\n)\n\nselect *\nfrom final", "language": "sql", "refs": [], "sources": [["salesforce_history", "opportunity"], ["salesforce_history", "opportunity"]], "metrics": [], "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt.type_timestamp", "macro.dbt_utils.generate_surrogate_key", "macro.dbt_utils.star"], "nodes": ["source.salesforce_source.salesforce_history.opportunity"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce_history/stg_salesforce__opportunity_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_opportunity_history_data\"\n \n where cast(_fivetran_start as TIMESTAMP) >= (select max(cast((_fivetran_start) as TIMESTAMP)) from \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__opportunity_history\" )\n \n),\n\nfinal as (\n\n select \n id as opportunity_id,\n cast(_fivetran_start as TIMESTAMP) as _fivetran_start,\n cast(_fivetran_end as TIMESTAMP) as _fivetran_end,\n cast(_fivetran_start as date) as _fivetran_date,\n md5(cast(coalesce(cast(id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(_fivetran_start as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as history_unique_key,\n\n \"_fivetran_active\",\n \"_fivetran_synced\",\n \"account_id\",\n \"amount\",\n \"campaign_id\",\n \"close_date\",\n \"created_date\",\n \"description\",\n \"expected_revenue\",\n \"fiscal\",\n \"fiscal_quarter\",\n \"fiscal_year\",\n \"forecast_category\",\n \"forecast_category_name\",\n \"has_open_activity\",\n \"has_opportunity_line_item\",\n \"has_overdue_task\",\n \"is_closed\",\n \"is_deleted\",\n \"is_won\",\n \"last_activity_date\",\n \"last_referenced_date\",\n \"last_viewed_date\",\n \"lead_source\",\n \"name\",\n \"next_step\",\n \"owner_id\",\n \"probability\",\n \"record_type_id\",\n \"stage_name\",\n \"synced_quote_id\",\n \"type\"\n from base\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__account_history": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__account_history", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce_history/stg_salesforce__account_history.sql", "original_file_path": "models/salesforce_history/stg_salesforce__account_history.sql", "unique_id": "model.salesforce_source.stg_salesforce__account_history", "fqn": ["salesforce_source", "salesforce_history", "stg_salesforce__account_history"], "alias": "stg_salesforce__account_history", "checksum": {"name": "sha256", "checksum": "dcce3ab61cac84fa621d4e07fb13c7c8138fa506832c326d31f0eef29d2d8492"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "history_unique_key", "on_schema_change": "fail", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "partition_by": {"field": "_fivetran_date", "data_type": "date"}, "file_format": "parquet", "post-hook": [], "pre-hook": []}, "tags": [], "description": "Represents historical records of individual accounts, which are organizations or people involved with your business (such as customers, competitors, and partners).", "columns": {"account_id": {"name": "account_id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_start": {"name": "_fivetran_start", "description": "The time when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The time until which the record was active minus epsilon, where epsilon is the smallest time difference that can be stored in the timestamp type value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_date": {"name": "_fivetran_date", "description": "The date when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "history_unique_key": {"name": "history_unique_key", "description": "Surrogate key hashed on `_fivetran_start` and `account_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "true if it is the currently active record. false if it is a historical version of the record. Only one version of the record can be true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_number": {"name": "account_number", "description": "Account number assigned to this account (not the unique, system-generated ID assigned during creation).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_source": {"name": "account_source", "description": "The source of the account record. For example, Advertisement, Data.com, or Trade Show.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "annual_revenue": {"name": "annual_revenue", "description": "Estimated annual revenue of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_city": {"name": "billing_city", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_country": {"name": "billing_country", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_postal_code": {"name": "billing_postal_code", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_state": {"name": "billing_state", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_street": {"name": "billing_street", "description": "Street address for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_description": {"name": "account_description", "description": "Text description of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "industry": {"name": "industry", "description": "An industry associated with this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is one of the following, whichever is the most recent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "master_record_id": {"name": "master_record_id", "description": "If this object was deleted as the result of a merge, this field contains the ID of the record that was kept. If this object was deleted for any other reason, or has not been deleted, the value is null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_name": {"name": "account_name", "description": "Required. Name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "number_of_employees": {"name": "number_of_employees", "description": "Number of employees working at the company represented by this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "The ID of the user who currently owns this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "ownership": {"name": "ownership", "description": "Ownership type for the account, for example Private, Public, or Subsidiary.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "ID of the parent object, if any.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "rating": {"name": "rating", "description": "The account\u2019s prospect rating, for example Hot, Warm, or Cold.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_city": {"name": "shipping_city", "description": "Details of the shipping address for this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_country": {"name": "shipping_country", "description": "Details of the shipping address for this account. Country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_postal_code": {"name": "shipping_postal_code", "description": "Details of the shipping address for this account. Postal code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_state": {"name": "shipping_state", "description": "Details of the shipping address for this account. State.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_street": {"name": "shipping_street", "description": "The street address of the shipping address for this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of account, for example, Customer, Competitor, or Partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "website": {"name": "website", "description": "The website of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce_history/stg_salesforce_history.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "enabled": true, "unique_key": "history_unique_key", "incremental_strategy": "delete+insert", "partition_by": {"field": "_fivetran_date", "data_type": "date"}, "file_format": "parquet", "on_schema_change": "fail"}, "created_at": 1698690621.7600489, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__account_history\"", "raw_code": "{{ config(\n enabled= var('salesforce__account_history_enabled', False),\n materialized='incremental',\n unique_key='history_unique_key',\n incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert',\n partition_by={\n \"field\": \"_fivetran_date\", \n \"data_type\": \"date\"\n } if target.type not in ('spark','databricks') else ['_fivetran_date'],\n file_format='parquet',\n on_schema_change='fail'\n )\n}}\n\nwith base as (\n\n select * \n from {{ source('salesforce_history', 'account') }}\n {% if is_incremental() %}\n where cast(_fivetran_start as {{ dbt.type_timestamp() }}) >= (select max(cast((_fivetran_start) as {{ dbt.type_timestamp() }})) from {{ this }} )\n {% else %}\n {% if var('global_history_start_date',[]) or var('account_history_start_date',[]) %}\n where cast(_fivetran_start as {{ dbt.type_timestamp() }}) >= \n {% if var('account_history_start_date', []) %}\n \"{{ var('account_history_start_date') }}\"\n {% else %}\n \"{{ var('global_history_start_date') }}\"\n {% endif %}\n {% endif %}\n {% endif %} \n),\n\nfinal as (\n\n select \n id as account_id,\n cast(_fivetran_start as {{ dbt.type_timestamp() }}) as _fivetran_start,\n cast(_fivetran_end as {{ dbt.type_timestamp() }}) as _fivetran_end,\n cast(_fivetran_start as date) as _fivetran_date,\n {{ dbt_utils.generate_surrogate_key(['id', '_fivetran_start']) }} as history_unique_key,\n\n {{ dbt_utils.star(from=source('salesforce_history','account'),\n except=[\"id\", \"_fivetran_start\", \"_fivetran_end\"]) }}\n from base\n)\n\nselect *\nfrom final", "language": "sql", "refs": [], "sources": [["salesforce_history", "account"], ["salesforce_history", "account"]], "metrics": [], "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt.type_timestamp", "macro.dbt_utils.generate_surrogate_key", "macro.dbt_utils.star"], "nodes": ["source.salesforce_source.salesforce_history.account"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce_history/stg_salesforce__account_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_account_history_data\"\n \n where cast(_fivetran_start as TIMESTAMP) >= (select max(cast((_fivetran_start) as TIMESTAMP)) from \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__account_history\" )\n \n),\n\nfinal as (\n\n select \n id as account_id,\n cast(_fivetran_start as TIMESTAMP) as _fivetran_start,\n cast(_fivetran_end as TIMESTAMP) as _fivetran_end,\n cast(_fivetran_start as date) as _fivetran_date,\n md5(cast(coalesce(cast(id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(_fivetran_start as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as history_unique_key,\n\n \"_fivetran_active\",\n \"_fivetran_synced\",\n \"account_number\",\n \"account_source\",\n \"annual_revenue\",\n \"billing_city\",\n \"billing_country\",\n \"billing_postal_code\",\n \"billing_state\",\n \"billing_street\",\n \"description\",\n \"industry\",\n \"is_deleted\",\n \"last_activity_date\",\n \"last_referenced_date\",\n \"last_viewed_date\",\n \"master_record_id\",\n \"name\",\n \"number_of_employees\",\n \"owner_id\",\n \"ownership\",\n \"parent_id\",\n \"rating\",\n \"record_type_id\",\n \"shipping_city\",\n \"shipping_country\",\n \"shipping_postal_code\",\n \"shipping_state\",\n \"shipping_street\",\n \"type\",\n \"website\"\n from base\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__contact_history": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__contact_history", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce_history/stg_salesforce__contact_history.sql", "original_file_path": "models/salesforce_history/stg_salesforce__contact_history.sql", "unique_id": "model.salesforce_source.stg_salesforce__contact_history", "fqn": ["salesforce_source", "salesforce_history", "stg_salesforce__contact_history"], "alias": "stg_salesforce__contact_history", "checksum": {"name": "sha256", "checksum": "4c54e59e30090bd2518713a07ac527dac8730b36111e56f7894154e3c1dcadb8"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "history_unique_key", "on_schema_change": "fail", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "partition_by": {"field": "_fivetran_date", "data_type": "date"}, "file_format": "parquet", "post-hook": [], "pre-hook": []}, "tags": [], "description": "Represents the historical record of contacts, which are people associated with an account.", "columns": {"contact_id": {"name": "contact_id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_start": {"name": "_fivetran_start", "description": "The time when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The time until which the record was active minus epsilon, where epsilon is the smallest time difference that can be stored in the timestamp type value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_date": {"name": "_fivetran_date", "description": "The date when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "history_unique_key": {"name": "history_unique_key", "description": "Surrogate key hashed on `_fivetran_start` and `contact_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "true if it is the currently active record. false if it is a historical version of the record. Only one version of the record can be true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "ID of the account that\u2019s the parent of this contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "contact_description": {"name": "contact_description", "description": "A description of the contact. Label is Contact Description up to 32 KB.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "The contact\u2019s email address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The contact\u2019s first name up to 40 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "home_phone": {"name": "home_phone", "description": "The contact\u2019s home telephone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "individual_id": {"name": "individual_id", "description": "ID of the data privacy record associated with this contact. This field is available if Data Protection and Privacy is enabled. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is the most recent of either: Due date of the most recent event logged against the record. Due date of the most recently closed task associated with the record.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "Required. Last name of the contact up to 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_source": {"name": "lead_source", "description": "The lead\u2019s source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_city": {"name": "mailing_city", "description": "City mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_country": {"name": "mailing_country", "description": "Country mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_postal_code": {"name": "mailing_postal_code", "description": "Postal code mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_state": {"name": "mailing_state", "description": "State mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_street": {"name": "mailing_street", "description": "Street mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "master_record_id": {"name": "master_record_id", "description": "If this record was deleted as the result of a merge, this field contains the ID of the record that remains. If this record was deleted for any other reason, or has not been deleted, the value is null. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mobile_phone": {"name": "mobile_phone", "description": "Contact\u2019s mobile phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "contact_name": {"name": "contact_name", "description": "Concatenation of FirstName, MiddleName, LastName, and Suffix up to 203 characters, including whitespaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner of the account associated with this contact. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "phone": {"name": "phone", "description": "Telephone number for the contact. Label is Business Phone.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reports_to_id": {"name": "reports_to_id", "description": "This field doesn\u2019t appear if IsPersonAccount is true. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "title": {"name": "title", "description": "Title", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce_history/stg_salesforce_history.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "incremental", "enabled": true, "unique_key": "history_unique_key", "incremental_strategy": "delete+insert", "partition_by": {"field": "_fivetran_date", "data_type": "date"}, "file_format": "parquet", "on_schema_change": "fail"}, "created_at": 1698690621.763361, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__contact_history\"", "raw_code": "{{ config(\n enabled=var('salesforce__contact_history_enabled', False),\n materialized='incremental',\n unique_key='history_unique_key',\n incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert',\n partition_by={\n \"field\": \"_fivetran_date\", \n \"data_type\": \"date\"\n } if target.type not in ('spark','databricks') else ['_fivetran_date'],\n file_format='parquet',\n on_schema_change='fail'\n ) \n}}\n\nwith base as (\n\n select * \n from {{ source('salesforce_history', 'contact') }}\n {% if is_incremental() %}\n where cast(_fivetran_start as {{ dbt.type_timestamp() }}) >= (select max(cast((_fivetran_start) as {{ dbt.type_timestamp() }})) from {{ this }} )\n {% else %}\n {% if var('global_history_start_date',[]) or var('contact_history_start_date',[]) %}\n where cast(_fivetran_start as {{ dbt.type_timestamp() }}) >= \n {% if var('contact_history_start_date', []) %}\n \"{{ var('contact_history_start_date') }}\"\n {% else %}\n \"{{ var('global_history_start_date') }}\"\n {% endif %}\n {% endif %}\n {% endif %} \n),\n\nfinal as (\n\n select \n id as contact_id,\n cast(_fivetran_start as {{ dbt.type_timestamp() }}) as _fivetran_start,\n cast(_fivetran_end as {{ dbt.type_timestamp() }}) as _fivetran_end,\n cast(_fivetran_start as date) as _fivetran_date,\n {{ dbt_utils.generate_surrogate_key(['id', '_fivetran_start']) }} as history_unique_key,\n\n {{ dbt_utils.star(from=source('salesforce_history','contact'),\n except=[\"id\", \"_fivetran_start\", \"_fivetran_end\"]) }}\n from base\n)\n\nselect *\nfrom final", "language": "sql", "refs": [], "sources": [["salesforce_history", "contact"], ["salesforce_history", "contact"]], "metrics": [], "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt.type_timestamp", "macro.dbt_utils.generate_surrogate_key", "macro.dbt_utils.star"], "nodes": ["source.salesforce_source.salesforce_history.contact"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce_history/stg_salesforce__contact_history.sql", "compiled": true, "compiled_code": "\n\nwith base as (\n\n select * \n from \"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_contact_history_data\"\n \n where cast(_fivetran_start as TIMESTAMP) >= (select max(cast((_fivetran_start) as TIMESTAMP)) from \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__contact_history\" )\n \n),\n\nfinal as (\n\n select \n id as contact_id,\n cast(_fivetran_start as TIMESTAMP) as _fivetran_start,\n cast(_fivetran_end as TIMESTAMP) as _fivetran_end,\n cast(_fivetran_start as date) as _fivetran_date,\n md5(cast(coalesce(cast(id as TEXT), '_dbt_utils_surrogate_key_null_') || '-' || coalesce(cast(_fivetran_start as TEXT), '_dbt_utils_surrogate_key_null_') as TEXT)) as history_unique_key,\n\n \"_fivetran_active\",\n \"_fivetran_synced\",\n \"account_id\",\n \"email\",\n \"first_name\",\n \"is_deleted\",\n \"last_activity_date\",\n \"last_modified_by_id\",\n \"last_modified_date\",\n \"last_name\",\n \"last_referenced_date\",\n \"last_viewed_date\",\n \"mailing_city\",\n \"mailing_country\",\n \"mailing_country_code\",\n \"mailing_postal_code\",\n \"mailing_state\",\n \"mailing_street\",\n \"master_record_id\",\n \"mobile_phone\",\n \"name\",\n \"owner_id\",\n \"phone\",\n \"reports_to_id\",\n \"title\",\n \"lead_source\",\n \"description\",\n \"individual_id\",\n \"home_phone\"\n from base\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__opportunity": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__opportunity", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__opportunity.sql", "original_file_path": "models/salesforce/stg_salesforce__opportunity.sql", "unique_id": "model.salesforce_source.stg_salesforce__opportunity", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__opportunity"], "alias": "stg_salesforce__opportunity", "checksum": {"name": "sha256", "checksum": "db1fcbf2d51749ad307749a7eaa1451d19215e8457a8eb428c23539c4e967e78"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Represents an opportunity, which is a sale or pending deal.", "columns": {"opportunity_id": {"name": "opportunity_id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "ID of the account associated with this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "amount": {"name": "amount", "description": "Estimated total sale amount. For opportunities with products, the amount is the sum of the related products.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "ID of a related Campaign. This field is defined only for those organizations that have the campaign feature Campaigns enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "close_date": {"name": "close_date", "description": "Required. Date when the opportunity is expected to close. The Close Date will change as you work the sale. It should never be set in stone as it affects your sales pipeline, and it should never be in the past.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Date when the opportunity was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_description": {"name": "opportunity_description", "description": "Text description of the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "expected_revenue": {"name": "expected_revenue", "description": "Read-only field that is equal to the product of the opportunity Amount field and the Probability.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal": {"name": "fiscal", "description": "If fiscal years are not enabled, the name of the fiscal quarter or period in which the opportunity CloseDate falls.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal_quarter": {"name": "fiscal_quarter", "description": "Represents the fiscal quarter. Valid values are 1, 2, 3, or 4.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal_year": {"name": "fiscal_year", "description": "Represents the fiscal year, for example, 2006.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_category": {"name": "forecast_category", "description": "Restricted picklist field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_category_name": {"name": "forecast_category_name", "description": "The name of the forecast category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_open_activity": {"name": "has_open_activity", "description": "Indicates whether an opportunity has an open event or task (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_opportunity_line_item": {"name": "has_opportunity_line_item", "description": "Read-only field that indicates whether the opportunity has associated line items. A value of true means that Opportunity line items have been created for the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_overdue_task": {"name": "has_overdue_task", "description": "Indicates whether an opportunity has an overdue task (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_closed": {"name": "is_closed", "description": "True, if Stage Name Label is Closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_excluded_from_territory_2_filter": {"name": "is_excluded_from_territory_2_filter", "description": "Used for Filter-Based Opportunity Territory Assignment. Indicates whether the opportunity is excluded (True) or included (False) each time the APEX filter is executed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_won": {"name": "is_won", "description": "True, if Stage Name Label is Won.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is one of the following, whichever is the most recent:Due date of the most recent event logged against the record or Due date of the most recently closed task associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_source": {"name": "lead_source", "description": "Source of this opportunity, such as Advertisement or Trade Show.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_name": {"name": "opportunity_name", "description": "Required. A name for this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "next_step": {"name": "next_step", "description": "Description of next task in closing opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "ID of the User who has been assigned to work this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "Pricebook2Id": {"name": "Pricebook2Id", "description": "ID of a related Pricebook2 object. The Pricebook2Id field indicates which Pricebook2 applies to this opportunity. The Pricebook2Id field is defined only for those organizations that have products enabled as a feature. You can specify values for only one field (Pricebook2Id or PricebookId)\u2014not both fields. For this reason, both fields are declared nillable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "pricebook_2_id": {"name": "pricebook_2_id", "description": "Unavailable as of version 3.0. As of version 8.0, the Pricebook object is no longer available. Use the Pricebook2Id field instead, specifying the ID of the Pricebook2 record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "probability": {"name": "probability", "description": "Percentage of estimated confidence in closing the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "stage_name": {"name": "stage_name", "description": "Required. Current stage of this record. The StageName field controls several other fields on an opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "synced_quote_id": {"name": "synced_quote_id", "description": "The ID of the Quote that syncs with the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "territory_2_id": {"name": "territory_2_id", "description": "The ID of the territory that is assigned to the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of opportunity. For example, Existing Business or New Business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_created_this_month": {"name": "is_created_this_month", "description": "Yes, if the opportunity created date is in the current month.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_created_this_quarter": {"name": "is_created_this_quarter", "description": "Yes, if the opportunity created date is in the current quarter.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "days_since_created": {"name": "days_since_created", "description": "The difference, in days, between the opportunity created date and the current timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "days_to_close": {"name": "days_to_close", "description": "The difference, in days, between the opportunity created date and the opportunity close date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_closed_this_month": {"name": "is_closed_this_month", "description": "Yes, if the opportunity close date is in the current month.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_closed_this_quarter": {"name": "is_closed_this_quarter", "description": "Yes, if the opportunity close date is in the current quarter.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table"}, "created_at": 1698690621.80784, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__opportunity\"", "raw_code": "with fields as (\n\n select\n\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','opportunity')),\n staging_columns=get_opportunity_columns()\n )\n }}\n\n from {{ source('salesforce','opportunity') }}\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n account_id,\n cast(amount as {{ dbt.type_numeric() }}) as amount,\n campaign_id,\n cast(close_date as {{ dbt.type_timestamp() }}) as close_date,\n cast(created_date as {{ dbt.type_timestamp() }}) as created_date,\n description as opportunity_description,\n cast(expected_revenue as {{ dbt.type_numeric() }}) as expected_revenue,\n fiscal,\n fiscal_quarter,\n fiscal_year,\n forecast_category,\n forecast_category_name,\n has_open_activity,\n has_opportunity_line_item,\n has_overdue_task,\n id as opportunity_id,\n is_closed,\n is_deleted,\n is_won,\n cast(last_activity_date as {{ dbt.type_timestamp() }}) as last_activity_date,\n cast(last_referenced_date as {{ dbt.type_timestamp() }}) as last_referenced_date,\n cast(last_viewed_date as {{ dbt.type_timestamp() }}) as last_viewed_date,\n lead_source,\n name as opportunity_name,\n next_step,\n owner_id,\n probability,\n record_type_id,\n stage_name,\n synced_quote_id,\n type\n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__opportunity_pass_through_columns') }}\n\n from fields\n where coalesce(_fivetran_active, true)\n), \n\ncalculated as (\n \n select \n *,\n created_date >= {{ dbt.date_trunc('month', dbt.current_timestamp_backcompat()) }} as is_created_this_month,\n created_date >= {{ dbt.date_trunc('quarter', dbt.current_timestamp_backcompat()) }} as is_created_this_quarter,\n {{ dbt.datediff(dbt.current_timestamp_backcompat(), 'created_date', 'day') }} as days_since_created,\n {{ dbt.datediff('close_date', 'created_date', 'day') }} as days_to_close,\n {{ dbt.date_trunc('month', 'close_date') }} = {{ dbt.date_trunc('month', dbt.current_timestamp_backcompat()) }} as is_closed_this_month,\n {{ dbt.date_trunc('quarter', 'close_date') }} = {{ dbt.date_trunc('quarter', dbt.current_timestamp_backcompat()) }} as is_closed_this_quarter\n from final\n)\n\nselect * \nfrom calculated\nwhere not coalesce(is_deleted, false)", "language": "sql", "refs": [], "sources": [["salesforce", "opportunity"], ["salesforce", "opportunity"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_opportunity_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.dbt.type_numeric", "macro.fivetran_utils.fill_pass_through_columns", "macro.dbt.current_timestamp_backcompat", "macro.dbt.date_trunc", "macro.dbt.datediff"], "nodes": ["source.salesforce_source.salesforce.opportunity"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__opportunity.sql", "compiled": true, "compiled_code": "with fields as (\n\n select\n\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n account_id\n \n as \n \n account_id\n \n, \n \n \n amount\n \n as \n \n amount\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n close_date\n \n as \n \n close_date\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n expected_revenue\n \n as \n \n expected_revenue\n \n, \n \n \n fiscal\n \n as \n \n fiscal\n \n, \n \n \n fiscal_quarter\n \n as \n \n fiscal_quarter\n \n, \n \n \n fiscal_year\n \n as \n \n fiscal_year\n \n, \n \n \n forecast_category\n \n as \n \n forecast_category\n \n, \n \n \n forecast_category_name\n \n as \n \n forecast_category_name\n \n, \n \n \n has_open_activity\n \n as \n \n has_open_activity\n \n, \n \n \n has_opportunity_line_item\n \n as \n \n has_opportunity_line_item\n \n, \n \n \n has_overdue_task\n \n as \n \n has_overdue_task\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_closed\n \n as \n \n is_closed\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n is_won\n \n as \n \n is_won\n \n, \n \n \n last_activity_date\n \n as \n \n last_activity_date\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n lead_source\n \n as \n \n lead_source\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n next_step\n \n as \n \n next_step\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n probability\n \n as \n \n probability\n \n, \n \n \n record_type_id\n \n as \n \n record_type_id\n \n, \n \n \n stage_name\n \n as \n \n stage_name\n \n, \n \n \n synced_quote_id\n \n as \n \n synced_quote_id\n \n, \n \n \n type\n \n as \n \n type\n \n\n\n\n\n from \"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_opportunity_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as TIMESTAMP) as _fivetran_synced,\n account_id,\n cast(amount as numeric(28,6)) as amount,\n campaign_id,\n cast(close_date as TIMESTAMP) as close_date,\n cast(created_date as TIMESTAMP) as created_date,\n description as opportunity_description,\n cast(expected_revenue as numeric(28,6)) as expected_revenue,\n fiscal,\n fiscal_quarter,\n fiscal_year,\n forecast_category,\n forecast_category_name,\n has_open_activity,\n has_opportunity_line_item,\n has_overdue_task,\n id as opportunity_id,\n is_closed,\n is_deleted,\n is_won,\n cast(last_activity_date as TIMESTAMP) as last_activity_date,\n cast(last_referenced_date as TIMESTAMP) as last_referenced_date,\n cast(last_viewed_date as TIMESTAMP) as last_viewed_date,\n lead_source,\n name as opportunity_name,\n next_step,\n owner_id,\n probability,\n record_type_id,\n stage_name,\n synced_quote_id,\n type\n \n \n\n\n\n\n\n from fields\n where coalesce(_fivetran_active, true)\n), \n\ncalculated as (\n \n select \n *,\n created_date >= date_trunc('month', \n current_timestamp::TIMESTAMP\n) as is_created_this_month,\n created_date >= date_trunc('quarter', \n current_timestamp::TIMESTAMP\n) as is_created_this_quarter,\n \n ((created_date)::date - (\n current_timestamp::TIMESTAMP\n)::date)\n as days_since_created,\n \n ((created_date)::date - (close_date)::date)\n as days_to_close,\n date_trunc('month', close_date) = date_trunc('month', \n current_timestamp::TIMESTAMP\n) as is_closed_this_month,\n date_trunc('quarter', close_date) = date_trunc('quarter', \n current_timestamp::TIMESTAMP\n) as is_closed_this_quarter\n from final\n)\n\nselect * \nfrom calculated\nwhere not coalesce(is_deleted, false)", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__user_role": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__user_role", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__user_role.sql", "original_file_path": "models/salesforce/stg_salesforce__user_role.sql", "unique_id": "model.salesforce_source.stg_salesforce__user_role", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__user_role"], "alias": "stg_salesforce__user_role", "checksum": {"name": "sha256", "checksum": "98379927315791139aefa7826b3ef3edc60f6a2a6d21b4b29646ce389d18592a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Represents a user role in your organization.", "columns": {"user_role_id": {"name": "user_role_id", "description": "The unique, system-generated ID assigned during creation", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "True, if this field has been deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "case_access_for_account_owner": {"name": "case_access_for_account_owner", "description": "The case access level for the account owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "contact_access_for_account_owner": {"name": "contact_access_for_account_owner", "description": "The contact access level for the account owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "developer_name": {"name": "developer_name", "description": "The unique name of the object in the API.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_user_id": {"name": "forecast_user_id", "description": "The ID of the forecast manager associated with this role.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "may_forecast_manager_share": {"name": "may_forecast_manager_share", "description": "Indicates whether the forecast manager can manually share their own forecast.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "user_role_name": {"name": "user_role_name", "description": "Required. Name of the role. Corresponds to Label on the user interface.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_access_for_account_owner": {"name": "opportunity_access_for_account_owner", "description": "Required. The opportunity access level for the account owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_role_id": {"name": "parent_role_id", "description": "The ID of the parent role.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "portal_type": {"name": "portal_type", "description": "This value indicates the type of portal for the role", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "rollup_description": {"name": "rollup_description", "description": "Description of the forecast rollup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "enabled": true}, "created_at": 1698690621.8202538, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__user_role\"", "raw_code": "--To disable this model, set the salesforce__user_role_enabled within your dbt_project.yml file to False.\n{{ config(enabled=var('salesforce__user_role_enabled', True)) }}\n\nwith fields as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','user_role')),\n staging_columns=get_user_role_columns()\n )\n }}\n\n from {{ source('salesforce','user_role') }}\n), \n\nfinal as (\n\n select\n _fivetran_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n developer_name,\n id as user_role_id,\n name as user_role_name,\n opportunity_access_for_account_owner,\n parent_role_id,\n rollup_description\n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__user_role_pass_through_columns') }}\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "language": "sql", "refs": [], "sources": [["salesforce", "user_role"], ["salesforce", "user_role"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_user_role_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["source.salesforce_source.salesforce.user_role"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__user_role.sql", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__user_role_enabled within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n developer_name\n \n as \n \n developer_name\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n opportunity_access_for_account_owner\n \n as \n \n opportunity_access_for_account_owner\n \n, \n \n \n parent_role_id\n \n as \n \n parent_role_id\n \n, \n \n \n rollup_description\n \n as \n \n rollup_description\n \n\n\n\n\n from \"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_user_role_data\"\n), \n\nfinal as (\n\n select\n _fivetran_deleted,\n cast(_fivetran_synced as TIMESTAMP) as _fivetran_synced,\n developer_name,\n id as user_role_id,\n name as user_role_name,\n opportunity_access_for_account_owner,\n parent_role_id,\n rollup_description\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__contact": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__contact", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__contact.sql", "original_file_path": "models/salesforce/stg_salesforce__contact.sql", "unique_id": "model.salesforce_source.stg_salesforce__contact", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__contact"], "alias": "stg_salesforce__contact", "checksum": {"name": "sha256", "checksum": "e7f7473235c65e34866d5f1c38f0d580438cc95ea38fc54838c8f58e82e93e61"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Represents a contact, which is a person associated with an account.", "columns": {"contact_id": {"name": "contact_id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "ID of the account that\u2019s the parent of this contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "department": {"name": "department", "description": "The contact\u2019s department.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "contact_description": {"name": "contact_description", "description": "A description of the contact. Label is Contact Description up to 32 KB.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "The contact\u2019s email address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The contact\u2019s first name up to 40 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "home_phone": {"name": "home_phone", "description": "The contact\u2019s home telephone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "individual_id": {"name": "individual_id", "description": "ID of the data privacy record associated with this contact. This field is available if Data Protection and Privacy is enabled. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is the most recent of either: Due date of the most recent event logged against the record. Due date of the most recently closed task associated with the record.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "Required. Last name of the contact up to 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_source": {"name": "lead_source", "description": "The lead\u2019s source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_city": {"name": "mailing_city", "description": "Mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_country": {"name": "mailing_country", "description": "Mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_country_code": {"name": "mailing_country_code", "description": "The ISO codes for the mailing address\u2019s state and country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_postal_code": {"name": "mailing_postal_code", "description": "Mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_state": {"name": "mailing_state", "description": "Mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_state_code": {"name": "mailing_state_code", "description": "The ISO codes for the mailing address\u2019s state and country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_street": {"name": "mailing_street", "description": "Street address for mailing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "master_record_id": {"name": "master_record_id", "description": "If this record was deleted as the result of a merge, this field contains the ID of the record that remains. If this record was deleted for any other reason, or has not been deleted, the value is null. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mobile_phone": {"name": "mobile_phone", "description": "Contact\u2019s mobile phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "contact_name": {"name": "contact_name", "description": "Concatenation of FirstName, MiddleName, LastName, and Suffix up to 203 characters, including whitespaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner of the account associated with this contact. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "phone": {"name": "phone", "description": "Telephone number for the contact. Label is Business Phone.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reports_to_id": {"name": "reports_to_id", "description": "This field doesn\u2019t appear if IsPersonAccount is true. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "title": {"name": "title", "description": "Title", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table"}, "created_at": 1698690621.82129, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__contact\"", "raw_code": "with fields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','contact')),\n staging_columns=get_contact_columns()\n )\n }}\n \n from {{ source('salesforce','contact') }}\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as contact_id,\n account_id,\n department,\n description as contact_description,\n email,\n first_name,\n home_phone,\n individual_id,\n is_deleted,\n cast(last_activity_date as {{ dbt.type_timestamp() }}) as last_activity_date,\n last_modified_by_id,\n last_modified_date,\n last_name,\n last_referenced_date,\n cast(last_viewed_date as {{ dbt.type_timestamp() }}) as last_viewed_date,\n lead_source,\n mailing_city,\n mailing_country,\n mailing_country_code,\n mailing_postal_code,\n mailing_state,\n mailing_state_code,\n mailing_street,\n master_record_id,\n mobile_phone,\n name as contact_name,\n owner_id,\n phone,\n reports_to_id,\n title\n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__contact_pass_through_columns') }}\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "language": "sql", "refs": [], "sources": [["salesforce", "contact"], ["salesforce", "contact"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_contact_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["source.salesforce_source.salesforce.contact"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__contact.sql", "compiled": true, "compiled_code": "with fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n account_id\n \n as \n \n account_id\n \n, \n \n \n department\n \n as \n \n department\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n email\n \n as \n \n email\n \n, \n \n \n first_name\n \n as \n \n first_name\n \n, \n \n \n home_phone\n \n as \n \n home_phone\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n individual_id\n \n as \n \n individual_id\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n last_activity_date\n \n as \n \n last_activity_date\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n last_name\n \n as \n \n last_name\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n lead_source\n \n as \n \n lead_source\n \n, \n \n \n mailing_city\n \n as \n \n mailing_city\n \n, \n \n \n mailing_country\n \n as \n \n mailing_country\n \n, \n \n \n mailing_country_code\n \n as \n \n mailing_country_code\n \n, \n \n \n mailing_postal_code\n \n as \n \n mailing_postal_code\n \n, \n \n \n mailing_state\n \n as \n \n mailing_state\n \n, \n \n \n mailing_state_code\n \n as \n \n mailing_state_code\n \n, \n \n \n mailing_street\n \n as \n \n mailing_street\n \n, \n \n \n master_record_id\n \n as \n \n master_record_id\n \n, \n \n \n mobile_phone\n \n as \n \n mobile_phone\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n phone\n \n as \n \n phone\n \n, \n \n \n reports_to_id\n \n as \n \n reports_to_id\n \n, \n \n \n title\n \n as \n \n title\n \n\n\n\n \n from \"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_contact_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as TIMESTAMP) as _fivetran_synced,\n id as contact_id,\n account_id,\n department,\n description as contact_description,\n email,\n first_name,\n home_phone,\n individual_id,\n is_deleted,\n cast(last_activity_date as TIMESTAMP) as last_activity_date,\n last_modified_by_id,\n last_modified_date,\n last_name,\n last_referenced_date,\n cast(last_viewed_date as TIMESTAMP) as last_viewed_date,\n lead_source,\n mailing_city,\n mailing_country,\n mailing_country_code,\n mailing_postal_code,\n mailing_state,\n mailing_state_code,\n mailing_street,\n master_record_id,\n mobile_phone,\n name as contact_name,\n owner_id,\n phone,\n reports_to_id,\n title\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__account": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__account", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__account.sql", "original_file_path": "models/salesforce/stg_salesforce__account.sql", "unique_id": "model.salesforce_source.stg_salesforce__account", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__account"], "alias": "stg_salesforce__account", "checksum": {"name": "sha256", "checksum": "d730ca26be27992d4a88b6892a16a789094fe25de70819b6b9165479a41ca763"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Represents an individual account, which is an organization or person involved with your business (such as customers, competitors, and partners).", "columns": {"account_id": {"name": "account_id", "description": "The unique, system-generated ID assigned during creation", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_number": {"name": "account_number", "description": "Account number assigned to this account (not the unique, system-generated ID assigned during creation).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_source": {"name": "account_source", "description": "The source of the account record. For example, Advertisement, Data.com, or Trade Show.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "annual_revenue": {"name": "annual_revenue", "description": "Estimated annual revenue of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_city": {"name": "billing_city", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_country": {"name": "billing_country", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_country_code": {"name": "billing_country_code", "description": "The ISO country code for the account\u2019s billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_geocode_accuracy": {"name": "billing_geocode_accuracy", "description": "Accuracy level of the geocode for the billing address. See Compound Field Considerations and Limitations for details on geolocation compound fields.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_latitude": {"name": "billing_latitude", "description": "Used with BillingLongitude to specify the precise geolocation of a billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_longitude": {"name": "billing_longitude", "description": "Used with BillingLatitude to specify the precise geolocation of a billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_postal_code": {"name": "billing_postal_code", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_state": {"name": "billing_state", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_state_code": {"name": "billing_state_code", "description": "The ISO state code for the account\u2019s billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_street": {"name": "billing_street", "description": "Street address for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_description": {"name": "account_description", "description": "Text description of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fax": {"name": "fax", "description": "Fax number for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "industry": {"name": "industry", "description": "An industry associated with this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "jigsaw_company_id": {"name": "jigsaw_company_id", "description": "References the ID of a company in Data.com. If an account has a value in this field, it means that the account was imported from Data.com.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is one of the following, whichever is the most recent", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "master_record_id": {"name": "master_record_id", "description": "If this object was deleted as the result of a merge, this field contains the ID of the record that was kept. If this object was deleted for any other reason, or has not been deleted, the value is null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_name": {"name": "account_name", "description": "Required. Name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "number_of_employees": {"name": "number_of_employees", "description": "Number of employees working at the company represented by this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "The ID of the user who currently owns this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "ownership": {"name": "ownership", "description": "Ownership type for the account, for example Private, Public, or Subsidiary.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "ID of the parent object, if any.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "phone": {"name": "phone", "description": "Phone number for this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "photo_url": {"name": "photo_url", "description": "Path to be combined with the URL of a Salesforce instance (for example, https://yourInstance.salesforce.com/) to generate a URL to request the social network profile image associated with the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "rating": {"name": "rating", "description": "The account\u2019s prospect rating, for example Hot, Warm, or Cold.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_city": {"name": "shipping_city", "description": "Details of the shipping address for this account", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_country": {"name": "shipping_country", "description": "Details of the shipping address for this account. Country", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_country_code": {"name": "shipping_country_code", "description": "The ISO country code for the account\u2019s shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_geocode_accuracy": {"name": "shipping_geocode_accuracy", "description": "Accuracy level of the geocode for the shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_latitude": {"name": "shipping_latitude", "description": "Used with ShippingLongitude to specify the precise geolocation of a shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_longitude": {"name": "shipping_longitude", "description": "Used with ShippingLatitude to specify the precise geolocation of an address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_postal_code": {"name": "shipping_postal_code", "description": "Details of the shipping address for this account. Postal code", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_state": {"name": "shipping_state", "description": "Details of the shipping address for this account. State", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_state_code": {"name": "shipping_state_code", "description": "The ISO state code for the account\u2019s shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_street": {"name": "shipping_street", "description": "The street address of the shipping address for this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sic": {"name": "sic", "description": "Standard Industrial Classification code of the company\u2019s main business categorization, for example, 57340 for Electronics.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sic_desc": {"name": "sic_desc", "description": "A brief description of an organization\u2019s line of business, based on its SIC code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "site": {"name": "site", "description": "Name of the account\u2019s location, for example Headquarters or London.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "ticker_symbol": {"name": "ticker_symbol", "description": "The stock market symbol for this account. This field is available on business accounts, not person accounts.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of account, for example, Customer, Competitor, or Partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "website": {"name": "website", "description": "The website of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table"}, "created_at": 1698690621.803699, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__account\"", "raw_code": "with fields as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','account')),\n staging_columns=get_account_columns()\n )\n }}\n\n from {{ source('salesforce','account') }}\n), \n\nfinal as (\n\n select \n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n account_number,\n account_source,\n cast(annual_revenue as {{ dbt.type_numeric() }}) as annual_revenue,\n billing_city,\n billing_country,\n billing_postal_code,\n billing_state,\n billing_state_code,\n billing_street,\n description as account_description,\n id as account_id,\n industry,\n is_deleted,\n cast(last_activity_date as {{ dbt.type_timestamp() }}) as last_activity_date,\n cast(last_referenced_date as {{ dbt.type_timestamp() }}) as last_referenced_date,\n cast(last_viewed_date as {{ dbt.type_timestamp() }}) as last_viewed_date,\n master_record_id,\n name as account_name,\n number_of_employees,\n owner_id,\n ownership,\n parent_id,\n rating,\n record_type_id,\n shipping_city,\n shipping_country,\n shipping_country_code,\n shipping_postal_code,\n shipping_state,\n shipping_state_code,\n shipping_street,\n type,\n website\n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__account_pass_through_columns') }}\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "language": "sql", "refs": [], "sources": [["salesforce", "account"], ["salesforce", "account"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_account_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.dbt.type_numeric", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["source.salesforce_source.salesforce.account"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__account.sql", "compiled": true, "compiled_code": "with fields as (\n\n select\n \n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n account_number\n \n as \n \n account_number\n \n, \n \n \n account_source\n \n as \n \n account_source\n \n, \n \n \n annual_revenue\n \n as \n \n annual_revenue\n \n, \n \n \n billing_city\n \n as \n \n billing_city\n \n, \n \n \n billing_country\n \n as \n \n billing_country\n \n, \n \n \n billing_postal_code\n \n as \n \n billing_postal_code\n \n, \n \n \n billing_state\n \n as \n \n billing_state\n \n, \n \n \n billing_state_code\n \n as \n \n billing_state_code\n \n, \n \n \n billing_street\n \n as \n \n billing_street\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n industry\n \n as \n \n industry\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n last_activity_date\n \n as \n \n last_activity_date\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n master_record_id\n \n as \n \n master_record_id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n number_of_employees\n \n as \n \n number_of_employees\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n ownership\n \n as \n \n ownership\n \n, \n \n \n parent_id\n \n as \n \n parent_id\n \n, \n \n \n rating\n \n as \n \n rating\n \n, \n \n \n record_type_id\n \n as \n \n record_type_id\n \n, \n \n \n shipping_city\n \n as \n \n shipping_city\n \n, \n \n \n shipping_country\n \n as \n \n shipping_country\n \n, \n \n \n shipping_country_code\n \n as \n \n shipping_country_code\n \n, \n \n \n shipping_postal_code\n \n as \n \n shipping_postal_code\n \n, \n \n \n shipping_state\n \n as \n \n shipping_state\n \n, \n \n \n shipping_state_code\n \n as \n \n shipping_state_code\n \n, \n \n \n shipping_street\n \n as \n \n shipping_street\n \n, \n \n \n type\n \n as \n \n type\n \n, \n \n \n website\n \n as \n \n website\n \n\n\n\n\n from \"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_account_data\"\n), \n\nfinal as (\n\n select \n cast(_fivetran_synced as TIMESTAMP) as _fivetran_synced,\n account_number,\n account_source,\n cast(annual_revenue as numeric(28,6)) as annual_revenue,\n billing_city,\n billing_country,\n billing_postal_code,\n billing_state,\n billing_state_code,\n billing_street,\n description as account_description,\n id as account_id,\n industry,\n is_deleted,\n cast(last_activity_date as TIMESTAMP) as last_activity_date,\n cast(last_referenced_date as TIMESTAMP) as last_referenced_date,\n cast(last_viewed_date as TIMESTAMP) as last_viewed_date,\n master_record_id,\n name as account_name,\n number_of_employees,\n owner_id,\n ownership,\n parent_id,\n rating,\n record_type_id,\n shipping_city,\n shipping_country,\n shipping_country_code,\n shipping_postal_code,\n shipping_state,\n shipping_state_code,\n shipping_street,\n type,\n website\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__lead": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__lead", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__lead.sql", "original_file_path": "models/salesforce/stg_salesforce__lead.sql", "unique_id": "model.salesforce_source.stg_salesforce__lead", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__lead"], "alias": "stg_salesforce__lead", "checksum": {"name": "sha256", "checksum": "812f3975b690790c86eace9f33b24f251fe0b6f398588d38b9cb53e7f10d4aa5"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Represents a prospect or lead.", "columns": {"lead_id": {"name": "lead_id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "annual_revenue": {"name": "annual_revenue", "description": "Annual revenue for the lead\u2019s company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "city": {"name": "city", "description": "City for the lead\u2019s address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "company": {"name": "company", "description": "Required. The lead\u2019s company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "converted_account_id": {"name": "converted_account_id", "description": "Object reference ID that points to the account into which the lead converted. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "converted_contact_id": {"name": "converted_contact_id", "description": "Object reference ID that points to the contact into which the lead converted. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "converted_date": {"name": "converted_date", "description": "Date on which this lead was converted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "converted_opportunity_id": {"name": "converted_opportunity_id", "description": "Object reference ID that points to the opportunity into which the lead has been converted. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "country": {"name": "country", "description": "The lead\u2019s country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "country_code": {"name": "country_code", "description": "The ISO country code for the lead\u2019s address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_description": {"name": "lead_description", "description": "The lead\u2019s description.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "The lead\u2019s email address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email_bounced_date": {"name": "email_bounced_date", "description": "If bounce management is activated and an email sent to the lead bounced, the date and time of the bounce.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email_bounced_reason": {"name": "email_bounced_reason", "description": "If bounce management is activated and an email sent to the lead bounced, the reason for the bounce.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fax": {"name": "fax", "description": "The lead\u2019s fax number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The lead\u2019s first name up to 40 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_opted_out_of_email": {"name": "has_opted_out_of_email", "description": "Indicates whether the lead doesn\u2019t want to receive email from Salesforce (true) or does (false). Label is Email Opt Out.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "individual_id": {"name": "individual_id", "description": "ID of the data privacy record associated with this lead. This field is available if you enabled Data Protection and Privacy in Setup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "industry": {"name": "industry", "description": "Industry in which the lead works.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_converted": {"name": "is_converted", "description": "Indicates whether the lead has been converted (true) or not (false). Label is Converted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_unread_by_owner": {"name": "is_unread_by_owner", "description": "If true, lead has been assigned, but not yet viewed. See Unread Leads for more information. Label is Unread By Owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "jigsaw_contact_id": {"name": "jigsaw_contact_id", "description": "Jigsaw Contact ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "'Value is the most recent of either: Due date of the most recent event logged against the record. Due date of the most recently closed task associated with the record.'\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "Required. Last name of the lead up to 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Used with Longitude to specify the precise geolocation of an address. Acceptable values are numbers between \u201390 and 90 up to 15 decimal places.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_source": {"name": "lead_source", "description": "The lead\u2019s source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Used with Latitude to specify the precise geolocation of an address. Acceptable values are numbers between \u2013180 and 180 up to 15 decimal places.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "master_record_id": {"name": "master_record_id", "description": "If this record was deleted as the result of a merge, this field contains the ID of the record that was kept. If this record was deleted for any other reason, or has not been deleted, the value is null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mobile_phone": {"name": "mobile_phone", "description": "The lead\u2019s mobile phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_name": {"name": "lead_name", "description": "Concatenation of FirstName, MiddleName, LastName, and Suffix up to 203 characters, including whitespaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "number_of_employees": {"name": "number_of_employees", "description": "Number of employees at the lead\u2019s company. Label is Employees.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "ID of the lead\u2019s owner. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "phone": {"name": "phone", "description": "The lead\u2019s phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "photo_url": {"name": "photo_url", "description": "Path to be combined with the URL of a Salesforce instance", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "postal_code": {"name": "postal_code", "description": "Postal code for the address of the lead. Label is Zip/Postal Code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "salutation": {"name": "salutation", "description": "Salutation for the lead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "state": {"name": "state", "description": "State for the address of the lead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "state_code": {"name": "state_code", "description": "The ISO state code for the lead\u2019s address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"name": "status", "description": "Status code for this converted lead. Status codes are defined in Status and represented in the API by the LeadStatus object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "street": {"name": "street", "description": "Street number and name for the address of the lead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "system_modstamp": {"name": "system_modstamp", "description": "System Modstamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "title": {"name": "title", "description": "Title for the lead, such as CFO or CEO.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "website": {"name": "website", "description": "Website for the lead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "enabled": true}, "created_at": 1698690621.8310452, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__lead\"", "raw_code": "--To disable this model, set the salesforce__lead_enabled within your dbt_project.yml file to False.\n{{ config(enabled=var('salesforce__lead_enabled', True)) }}\n\nwith fields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','lead')),\n staging_columns=get_lead_columns()\n )\n }}\n \n from {{ source('salesforce','lead') }}\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as lead_id,\n annual_revenue,\n city,\n company,\n converted_account_id,\n converted_contact_id,\n cast(converted_date as {{ dbt.type_timestamp() }}) as converted_date,\n converted_opportunity_id,\n country,\n country_code,\n created_by_id,\n cast(created_date as {{ dbt.type_timestamp() }}) as created_date,\n description as lead_description,\n email,\n cast(email_bounced_date as {{ dbt.type_timestamp() }}) as email_bounced_date,\n email_bounced_reason,\n first_name,\n has_opted_out_of_email,\n individual_id,\n industry,\n is_converted,\n is_deleted,\n is_unread_by_owner,\n cast(last_activity_date as {{ dbt.type_timestamp() }}) as last_activity_date,\n last_modified_by_id,\n cast(last_modified_date as {{ dbt.type_timestamp() }}) as last_modified_date,\n last_name,\n cast(last_referenced_date as {{ dbt.type_timestamp() }}) as last_referenced_date,\n cast(last_viewed_date as {{ dbt.type_timestamp() }}) as last_viewed_date,\n lead_source,\n master_record_id,\n mobile_phone,\n name as lead_name,\n number_of_employees,\n owner_id,\n phone,\n postal_code,\n state,\n state_code,\n status,\n street,\n title,\n website\n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__lead_pass_through_columns') }}\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "language": "sql", "refs": [], "sources": [["salesforce", "lead"], ["salesforce", "lead"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_lead_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["source.salesforce_source.salesforce.lead"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__lead.sql", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__lead_enabled within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n annual_revenue\n \n as \n \n annual_revenue\n \n, \n \n \n city\n \n as \n \n city\n \n, \n \n \n company\n \n as \n \n company\n \n, \n \n \n converted_account_id\n \n as \n \n converted_account_id\n \n, \n \n \n converted_contact_id\n \n as \n \n converted_contact_id\n \n, \n \n \n converted_date\n \n as \n \n converted_date\n \n, \n \n \n converted_opportunity_id\n \n as \n \n converted_opportunity_id\n \n, \n \n \n country\n \n as \n \n country\n \n, \n \n \n country_code\n \n as \n \n country_code\n \n, \n \n \n created_by_id\n \n as \n \n created_by_id\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n email\n \n as \n \n email\n \n, \n \n \n email_bounced_date\n \n as \n \n email_bounced_date\n \n, \n \n \n email_bounced_reason\n \n as \n \n email_bounced_reason\n \n, \n \n \n first_name\n \n as \n \n first_name\n \n, \n \n \n has_opted_out_of_email\n \n as \n \n has_opted_out_of_email\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n individual_id\n \n as \n \n individual_id\n \n, \n \n \n industry\n \n as \n \n industry\n \n, \n \n \n is_converted\n \n as \n \n is_converted\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n is_unread_by_owner\n \n as \n \n is_unread_by_owner\n \n, \n \n \n last_activity_date\n \n as \n \n last_activity_date\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n last_name\n \n as \n \n last_name\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n lead_source\n \n as \n \n lead_source\n \n, \n \n \n master_record_id\n \n as \n \n master_record_id\n \n, \n \n \n mobile_phone\n \n as \n \n mobile_phone\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n number_of_employees\n \n as \n \n number_of_employees\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n phone\n \n as \n \n phone\n \n, \n \n \n postal_code\n \n as \n \n postal_code\n \n, \n \n \n state\n \n as \n \n state\n \n, \n \n \n state_code\n \n as \n \n state_code\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n street\n \n as \n \n street\n \n, \n \n \n title\n \n as \n \n title\n \n, \n \n \n website\n \n as \n \n website\n \n\n\n\n \n from \"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_lead_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as TIMESTAMP) as _fivetran_synced,\n id as lead_id,\n annual_revenue,\n city,\n company,\n converted_account_id,\n converted_contact_id,\n cast(converted_date as TIMESTAMP) as converted_date,\n converted_opportunity_id,\n country,\n country_code,\n created_by_id,\n cast(created_date as TIMESTAMP) as created_date,\n description as lead_description,\n email,\n cast(email_bounced_date as TIMESTAMP) as email_bounced_date,\n email_bounced_reason,\n first_name,\n has_opted_out_of_email,\n individual_id,\n industry,\n is_converted,\n is_deleted,\n is_unread_by_owner,\n cast(last_activity_date as TIMESTAMP) as last_activity_date,\n last_modified_by_id,\n cast(last_modified_date as TIMESTAMP) as last_modified_date,\n last_name,\n cast(last_referenced_date as TIMESTAMP) as last_referenced_date,\n cast(last_viewed_date as TIMESTAMP) as last_viewed_date,\n lead_source,\n master_record_id,\n mobile_phone,\n name as lead_name,\n number_of_employees,\n owner_id,\n phone,\n postal_code,\n state,\n state_code,\n status,\n street,\n title,\n website\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__order": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__order", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__order.sql", "original_file_path": "models/salesforce/stg_salesforce__order.sql", "unique_id": "model.salesforce_source.stg_salesforce__order", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__order"], "alias": "stg_salesforce__order", "checksum": {"name": "sha256", "checksum": "1c5b56160257a1ca439dd9df8cd4862c353b15c61a28fd31445b96d6ee180dde"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Represents an order associated with a contract or an account.", "columns": {"order_id": {"name": "order_id", "description": "order id", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "Required. ID of the Account associated with this order. Can only be updated when the order\u2019s StatusCode value is Draft. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "activated_by_id": {"name": "activated_by_id", "description": "ID of the User who activated this order. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "activated_date": {"name": "activated_date", "description": "Date and time when the order was activated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_city": {"name": "billing_city", "description": "City for the billing address for this order. Maximum size is 40 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_country": {"name": "billing_country", "description": "Country for the billing address for this order. Maximum size is 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_country_code": {"name": "billing_country_code", "description": "ISO country code for the billing address for this order.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_geocode_accuracy": {"name": "billing_geocode_accuracy", "description": "Accuracy level of the geocode of the address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_postal_code": {"name": "billing_postal_code", "description": "Postal code for the billing address for this order. Maximum size is 20 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_state": {"name": "billing_state", "description": "State for the billing address for this order. Maximum size is 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_state_code": {"name": "billing_state_code", "description": "ISO state code for the order\u2019s billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_street": {"name": "billing_street", "description": "Street address for the billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "contract_id": {"name": "contract_id", "description": "ID of the contract associated with this order. Can only be updated when the order\u2019s StatusCode value is Draft. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "order_description": {"name": "order_description", "description": "Description of the order.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "end_date": {"name": "end_date", "description": "Date at which the order ends. Label is Order End Date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_id": {"name": "opportunity_id", "description": "ID for the opportunity that\u2019s associated with this order.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "order_number": {"name": "order_number", "description": "Order number assigned to this order (not the unique, system-generated ID assigned during creation). Maximum size is 30 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "original_order_id": {"name": "original_order_id", "description": "Optional. ID of the original order that a reduction order is reducing, if the reduction order is reducing a single order. Label is Original Order. Editable only if isReductionOrder is true. If the reduction order is reducing more than one order, leave blank. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "Required. ID of the User or queue that owns this order. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "pricebook_2_id": {"name": "pricebook_2_id", "description": "Required. ID of the price book associated with this order. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_city": {"name": "shipping_city", "description": "City of the shipping address. Maximum size is 40 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_country": {"name": "shipping_country", "description": "Country of the shipping address. Maximum size is 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_country_code": {"name": "shipping_country_code", "description": "ISO country code for the order\u2019s shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_geocode_accuracy": {"name": "shipping_geocode_accuracy", "description": "Accuracy level of the geocode of the shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_postal_code": {"name": "shipping_postal_code", "description": "Postal code of the shipping address. Maximum size is 20 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_state": {"name": "shipping_state", "description": "State of the shipping address. Maximum size is 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_state_code": {"name": "shipping_state_code", "description": "ISO state code for the order\u2019s shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_street": {"name": "shipping_street", "description": "Street address of the shipping address. Maximum of 255 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"name": "status", "description": "Picklist of values that indicate order status. Each value is within one of two status categories defined in StatusCode. For example, the status picklist might contain Draft, Ready for Review, and Ready for Activation values with a StatusCode of Draft.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_code": {"name": "status_code", "description": "The status category for the order. An order can be either Draft or Activated. Label is Status Category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "total_amount": {"name": "total_amount", "description": "The total amount for the order products associated with this order. This field is available in API v48.0 and later.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "If you want to show more information about your order, you can add custom values to the Type picklist. By default, the Type field doesn't perform any actions or show any values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "enabled": true}, "created_at": 1698690621.836725, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__order\"", "raw_code": "--To disable this model, set the salesforce__order_enabled within your dbt_project.yml file to False.\n{{ config(enabled=var('salesforce__order_enabled', True)) }}\n\nwith fields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','order')),\n staging_columns=get_order_columns()\n )\n }}\n \n from {{ source('salesforce','order') }}\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as order_id,\n account_id,\n activated_by_id,\n cast(activated_date as {{ dbt.type_timestamp() }}) as activated_date,\n billing_city,\n billing_country,\n billing_country_code,\n billing_postal_code,\n billing_state,\n billing_state_code,\n billing_street,\n contract_id,\n created_by_id,\n created_date,\n description as order_description,\n cast(end_date as {{ dbt.type_timestamp() }}) as end_date,\n is_deleted,\n last_modified_by_id,\n cast(last_modified_date as {{ dbt.type_timestamp() }}) as last_modified_date,\n cast(last_referenced_date as {{ dbt.type_timestamp() }}) as last_referenced_date,\n cast(last_viewed_date as {{ dbt.type_timestamp() }}) as last_viewed_date,\n opportunity_id,\n order_number,\n original_order_id,\n owner_id,\n pricebook_2_id,\n shipping_city,\n shipping_country,\n shipping_country_code,\n shipping_postal_code,\n shipping_state,\n shipping_state_code,\n shipping_street,\n status,\n total_amount,\n type\n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__order_pass_through_columns') }}\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "language": "sql", "refs": [], "sources": [["salesforce", "order"], ["salesforce", "order"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_order_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["source.salesforce_source.salesforce.order"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__order.sql", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__order_enabled within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n account_id\n \n as \n \n account_id\n \n, \n \n \n activated_by_id\n \n as \n \n activated_by_id\n \n, \n \n \n activated_date\n \n as \n \n activated_date\n \n, \n \n \n billing_city\n \n as \n \n billing_city\n \n, \n \n \n billing_country\n \n as \n \n billing_country\n \n, \n \n \n billing_country_code\n \n as \n \n billing_country_code\n \n, \n \n \n billing_postal_code\n \n as \n \n billing_postal_code\n \n, \n \n \n billing_state\n \n as \n \n billing_state\n \n, \n \n \n billing_state_code\n \n as \n \n billing_state_code\n \n, \n \n \n billing_street\n \n as \n \n billing_street\n \n, \n \n \n contract_id\n \n as \n \n contract_id\n \n, \n \n \n created_by_id\n \n as \n \n created_by_id\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n end_date\n \n as \n \n end_date\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n opportunity_id\n \n as \n \n opportunity_id\n \n, \n \n \n order_number\n \n as \n \n order_number\n \n, \n \n \n original_order_id\n \n as \n \n original_order_id\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n pricebook_2_id\n \n as \n \n pricebook_2_id\n \n, \n \n \n shipping_city\n \n as \n \n shipping_city\n \n, \n \n \n shipping_country\n \n as \n \n shipping_country\n \n, \n \n \n shipping_country_code\n \n as \n \n shipping_country_code\n \n, \n \n \n shipping_postal_code\n \n as \n \n shipping_postal_code\n \n, \n \n \n shipping_state\n \n as \n \n shipping_state\n \n, \n \n \n shipping_state_code\n \n as \n \n shipping_state_code\n \n, \n \n \n shipping_street\n \n as \n \n shipping_street\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n total_amount\n \n as \n \n total_amount\n \n, \n \n \n type\n \n as \n \n type\n \n\n\n\n \n from \"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_order_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as TIMESTAMP) as _fivetran_synced,\n id as order_id,\n account_id,\n activated_by_id,\n cast(activated_date as TIMESTAMP) as activated_date,\n billing_city,\n billing_country,\n billing_country_code,\n billing_postal_code,\n billing_state,\n billing_state_code,\n billing_street,\n contract_id,\n created_by_id,\n created_date,\n description as order_description,\n cast(end_date as TIMESTAMP) as end_date,\n is_deleted,\n last_modified_by_id,\n cast(last_modified_date as TIMESTAMP) as last_modified_date,\n cast(last_referenced_date as TIMESTAMP) as last_referenced_date,\n cast(last_viewed_date as TIMESTAMP) as last_viewed_date,\n opportunity_id,\n order_number,\n original_order_id,\n owner_id,\n pricebook_2_id,\n shipping_city,\n shipping_country,\n shipping_country_code,\n shipping_postal_code,\n shipping_state,\n shipping_state_code,\n shipping_street,\n status,\n total_amount,\n type\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__event": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__event", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__event.sql", "original_file_path": "models/salesforce/stg_salesforce__event.sql", "unique_id": "model.salesforce_source.stg_salesforce__event", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__event"], "alias": "stg_salesforce__event", "checksum": {"name": "sha256", "checksum": "a7a508cb7349f262703714caaffff5fa33ae07deeaff0a467ea2b79208989231"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Represents an event in the calendar. In the user interface, event and task records are collectively referred to as activities.", "columns": {"event_id": {"name": "event_id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "Represents the ID of the related account. The AccountId is determined as follows. If the value of WhatId is any of the following objects, then Salesforce uses that object\u2019s AccountId.\nAccount Opportunity Contract Custom object that is a child of Account If the value of the WhatId field is any other object, and the value of the WhoId field is a contact object, then Salesforce uses that contact\u2019s AccountId. (If your org uses Shared Activities, Salesforce uses the AccountId of the primary contact.)\nOtherwise, Salesforce sets the value of the AccountId field to null.\nFor information on IDs, see ID Field Type.\nThis is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "activity_date": {"name": "activity_date", "description": "Contains the event\u2019s due date if the IsAllDayEvent flag is set to true. This field is a date field with a timestamp that is always set to midnight in the Coordinated Universal Time (UTC) time zone. Don\u2019t attempt to alter the timestamp to account for time zone differences. Label is Due Date Only. This field is required in versions 12.0 and earlier if the IsAllDayEvent flag is set to true.\nThe value for this field and StartDateTime must match, or one of them must be null.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "activity_date_time": {"name": "activity_date_time", "description": "Contains the event\u2019s due date if the IsAllDayEvent flag is set to false. The time portion of this field is always transferred in the Coordinated Universal Time (UTC) time zone. Translate the time portion to or from a local time zone for the user or the application, as appropriate. Label is Due Date Time. This field is required in versions 12.0 and earlier if the IsAllDayEvent flag is set to false.\nThe value for this field and StartDateTime must match, or one of them must be null.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "event_description": {"name": "event_description", "description": "Contains a text description of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "duration_in_minutes": {"name": "duration_in_minutes", "description": "Contains the event length, in minutes\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "end_date": {"name": "end_date", "description": "Read-only. Available in versions 46.0 and later. This field supplies the date value that appears in the EndDateTime field. This field is a date field with a timestamp that is always set to midnight in the Coordinated Universal Time (UTC) time zone.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "end_date_time": {"name": "end_date_time", "description": "Available in versions 13.0 and later. The time portion of this field is always transferred in the Coordinated Universal Time (UTC) time zone. Translate the time portion to or from a local time zone for the user or the application, as appropriate.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "event_subtype": {"name": "event_subtype", "description": "Provides standard subtypes to facilitate creating and searching for events. This field isn\u2019t updateable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "group_event_type": {"name": "group_event_type", "description": "Group Event Type", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_archived": {"name": "is_archived", "description": "Indicates whether the event has been archived.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_child": {"name": "is_child", "description": "Indicates whether the event is a child of another event (true) or not (false). For a child event, you can update IsReminderSet and ReminderDateTime only. You can query and delete a child event. If the objects related to the child event are different from those objects related to the parent event (this difference is possible if you use API version 25.0 or earlier) and one of the objects related to the child event is deleted, the objects related to the parent event are updated to ensure data integrity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_group_event": {"name": "is_group_event", "description": "Indicates whether the event is a group event\u2014that is, whether it has invitees (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_recurrence": {"name": "is_recurrence", "description": "Indicates whether a Salesforce Classic event is scheduled to repeat itself (true) or only occurs one time (false). This field is read-only when updating records, but not when creating them. If this field value is true, then RecurrenceEndDateOnly, RecurrenceStartDateTime, RecurrenceType, and any recurrence fields associated with the given recurrence type must be populated. Label is Create recurring series of events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "location": {"name": "location", "description": "Contains the location of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "Contains the ID of the user or public calendar who owns the event. Label is Assigned to ID. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "start_date_time": {"name": "start_date_time", "description": "Indicates the start date and time of the event. Available in versions 13.0 and later.\nIf this field has a value, then ActivityDate and ActivityDateTime must either be null or match the value of this field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "subject": {"name": "subject", "description": "The subject line of the event, such as Call, Email, or Meeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "Indicates the event type, such as Call, Email, or Meeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "what_count": {"name": "what_count", "description": "Available if your organization has enabled Shared Activities. Represents the count of related EventRelations pertaining to the WhatId. The count of the WhatId must be 1 or less.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "what_id": {"name": "what_id", "description": "The WhatId represents nonhuman objects such as accounts, opportunities, campaigns, cases, or custom objects. WhatIds are polymorphic. Polymorphic means a WhatId is equivalent to the ID of a related object. The label is Related To ID. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "who_count": {"name": "who_count", "description": "Available to organizations that have Shared Activities enabled. Represents the count of related EventRelations pertaining to the WhoId.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "who_id": {"name": "who_id", "description": "The WhoId represents a human such as a lead or a contact. WhoIds are polymorphic. Polymorphic means a WhoId is equivalent to a contact\u2019s ID or a lead\u2019s ID. The label is Name ID.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "enabled": true}, "created_at": 1698690621.8251321, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__event\"", "raw_code": "--To disable this model, set the salesforce__event_enabled variable within your dbt_project.yml file to False.\n{{ config(enabled=var('salesforce__event_enabled', True)) }}\n\nwith fields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','event')),\n staging_columns=get_event_columns()\n )\n }}\n\n from {{ source('salesforce','event') }}\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as event_id,\n account_id,\n cast(activity_date as {{ dbt.type_timestamp() }}) as activity_date,\n cast(activity_date_time as {{ dbt.type_timestamp() }}) as activity_date_time,\n created_by_id,\n cast(created_date as {{ dbt.type_timestamp() }}) as created_date,\n description as event_description,\n cast(end_date as {{ dbt.type_timestamp() }}) as end_date,\n cast(end_date_time as {{ dbt.type_timestamp() }}) as end_date_time,\n event_subtype,\n group_event_type,\n is_archived,\n is_child,\n is_deleted,\n is_group_event,\n is_recurrence,\n last_modified_by_id,\n cast(last_modified_date as {{ dbt.type_timestamp() }}) as last_modified_date,\n location,\n owner_id,\n cast(start_date_time as {{ dbt.type_timestamp() }}) as start_date_time,\n subject,\n type,\n what_count,\n what_id,\n who_count,\n who_id\n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__event_pass_through_columns') }}\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "language": "sql", "refs": [], "sources": [["salesforce", "event"], ["salesforce", "event"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_event_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["source.salesforce_source.salesforce.event"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__event.sql", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__event_enabled variable within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n account_id\n \n as \n \n account_id\n \n, \n \n \n activity_date\n \n as \n \n activity_date\n \n, \n \n \n activity_date_time\n \n as \n \n activity_date_time\n \n, \n \n \n created_by_id\n \n as \n \n created_by_id\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n end_date\n \n as \n \n end_date\n \n, \n \n \n end_date_time\n \n as \n \n end_date_time\n \n, \n \n \n event_subtype\n \n as \n \n event_subtype\n \n, \n \n \n group_event_type\n \n as \n \n group_event_type\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_archived\n \n as \n \n is_archived\n \n, \n \n \n is_child\n \n as \n \n is_child\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n is_group_event\n \n as \n \n is_group_event\n \n, \n \n \n is_recurrence\n \n as \n \n is_recurrence\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n location\n \n as \n \n location\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n start_date_time\n \n as \n \n start_date_time\n \n, \n \n \n subject\n \n as \n \n subject\n \n, \n \n \n type\n \n as \n \n type\n \n, \n \n \n what_count\n \n as \n \n what_count\n \n, \n \n \n what_id\n \n as \n \n what_id\n \n, \n \n \n who_count\n \n as \n \n who_count\n \n, \n \n \n who_id\n \n as \n \n who_id\n \n\n\n\n\n from \"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_event_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as TIMESTAMP) as _fivetran_synced,\n id as event_id,\n account_id,\n cast(activity_date as TIMESTAMP) as activity_date,\n cast(activity_date_time as TIMESTAMP) as activity_date_time,\n created_by_id,\n cast(created_date as TIMESTAMP) as created_date,\n description as event_description,\n cast(end_date as TIMESTAMP) as end_date,\n cast(end_date_time as TIMESTAMP) as end_date_time,\n event_subtype,\n group_event_type,\n is_archived,\n is_child,\n is_deleted,\n is_group_event,\n is_recurrence,\n last_modified_by_id,\n cast(last_modified_date as TIMESTAMP) as last_modified_date,\n location,\n owner_id,\n cast(start_date_time as TIMESTAMP) as start_date_time,\n subject,\n type,\n what_count,\n what_id,\n who_count,\n who_id\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__product_2": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__product_2", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__product_2.sql", "original_file_path": "models/salesforce/stg_salesforce__product_2.sql", "unique_id": "model.salesforce_source.stg_salesforce__product_2", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__product_2"], "alias": "stg_salesforce__product_2", "checksum": {"name": "sha256", "checksum": "5d0e9bd0d570f06380660c8e3f4c57f55ec80b0439001a67bc132576223e5bc0"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Represents a product that your company sells.", "columns": {"product_2_id": {"name": "product_2_id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "product_2_description": {"name": "product_2_description", "description": "A text description of this record. Label is Product Description.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "display_url": {"name": "display_url", "description": "URL leading to a specific version of a record in the linked external data source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "external_data_source_id": {"name": "external_data_source_id", "description": "ID of the related external data source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "external_id": {"name": "external_id", "description": "The unique identifier of a record in the linked external data source. For example, ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "family": {"name": "family", "description": "Name of the product family associated with this record. Product families are configured as picklists in the user interface. To obtain a list of valid values, call describeSObjects() and process the DescribeSObjectResult for the values associated with the Family field. Label is Product Family.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_active": {"name": "is_active", "description": "Indicates whether this record is active (true) or not (false). Inactive Product2 records are hidden in many areas in the user interface. You can change the IsActive flag on a Product2 object as often as necessary. Label is Active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_archived": {"name": "is_archived", "description": "Describes whether the product is archived. The default value is false.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "product_2_name": {"name": "product_2_name", "description": "Required. Default name of this record. Label is Product Name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "number_of_quantity_installments": {"name": "number_of_quantity_installments", "description": "If the product has a quantity schedule, the number of installments.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "number_of_revenue_installments": {"name": "number_of_revenue_installments", "description": "If the product has a revenue schedule, the number of installments.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "product_code": {"name": "product_code", "description": "Default product code for this record. Your org defines the product code naming pattern.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "quantity_installment_period": {"name": "quantity_installment_period", "description": "If the product has a quantity schedule, the amount of time covered by the schedule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "quantity_schedule_type": {"name": "quantity_schedule_type", "description": "The type of the quantity schedule, if the product has one.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "quantity_unit_of_measure": {"name": "quantity_unit_of_measure", "description": "Unit of the product; for example, kilograms, liters, or cases. This field comes with only one value, Each, so consider creating your own. The QuantityUnitOfMeasure field on ProductItem inherits this field\u2019s values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "revenue_installment_period": {"name": "revenue_installment_period", "description": "If the product has a revenue schedule, the time period covered by the schedule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "revenue_schedule_type": {"name": "revenue_schedule_type", "description": "The type of the revenue schedule, if the product has one.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "stock_keeping_unit": {"name": "stock_keeping_unit", "description": "The SKU for the product. Use in tandem with or instead of the ProductCode field. For example, you can track the manufacturer\u2019s identifying code in the Product Code field and assign the product a SKU when you resell it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "system_modstamp": {"name": "system_modstamp", "description": "System Modstamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "enabled": true}, "created_at": 1698690621.839993, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__product_2\"", "raw_code": "--To disable this model, set the salesforce__product_2_enabled variable within your dbt_project.yml file to False.\n{{ config(enabled=var('salesforce__product_2_enabled', True)) }}\n\nwith fields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','product_2')),\n staging_columns=get_product_2_columns()\n )\n }}\n \n from {{ source('salesforce','product_2') }}\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as product_2_id,\n created_by_id,\n cast(created_date as {{ dbt.type_timestamp() }}) as created_date,\n description as product_2_description,\n display_url,\n external_id,\n family,\n is_active,\n is_archived,\n is_deleted,\n last_modified_by_id,\n cast(last_modified_date as {{ dbt.type_timestamp() }}) as last_modified_date,\n cast(last_referenced_date as {{ dbt.type_timestamp() }}) as last_referenced_date,\n cast(last_viewed_date as {{ dbt.type_timestamp() }}) as last_viewed_date,\n name as product_2_name,\n number_of_quantity_installments,\n number_of_revenue_installments,\n product_code,\n quantity_installment_period,\n quantity_schedule_type,\n quantity_unit_of_measure,\n record_type_id,\n revenue_installment_period,\n revenue_schedule_type\n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__product_2_pass_through_columns') }}\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "language": "sql", "refs": [], "sources": [["salesforce", "product_2"], ["salesforce", "product_2"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_product_2_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["source.salesforce_source.salesforce.product_2"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__product_2.sql", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__product_2_enabled variable within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n created_by_id\n \n as \n \n created_by_id\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n display_url\n \n as \n \n display_url\n \n, \n \n \n external_id\n \n as \n \n external_id\n \n, \n \n \n family\n \n as \n \n family\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_active\n \n as \n \n is_active\n \n, \n \n \n is_archived\n \n as \n \n is_archived\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n number_of_quantity_installments\n \n as \n \n number_of_quantity_installments\n \n, \n \n \n number_of_revenue_installments\n \n as \n \n number_of_revenue_installments\n \n, \n \n \n product_code\n \n as \n \n product_code\n \n, \n \n \n quantity_installment_period\n \n as \n \n quantity_installment_period\n \n, \n \n \n quantity_schedule_type\n \n as \n \n quantity_schedule_type\n \n, \n \n \n quantity_unit_of_measure\n \n as \n \n quantity_unit_of_measure\n \n, \n \n \n record_type_id\n \n as \n \n record_type_id\n \n, \n \n \n revenue_installment_period\n \n as \n \n revenue_installment_period\n \n, \n \n \n revenue_schedule_type\n \n as \n \n revenue_schedule_type\n \n\n\n\n \n from \"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_product_2_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as TIMESTAMP) as _fivetran_synced,\n id as product_2_id,\n created_by_id,\n cast(created_date as TIMESTAMP) as created_date,\n description as product_2_description,\n display_url,\n external_id,\n family,\n is_active,\n is_archived,\n is_deleted,\n last_modified_by_id,\n cast(last_modified_date as TIMESTAMP) as last_modified_date,\n cast(last_referenced_date as TIMESTAMP) as last_referenced_date,\n cast(last_viewed_date as TIMESTAMP) as last_viewed_date,\n name as product_2_name,\n number_of_quantity_installments,\n number_of_revenue_installments,\n product_code,\n quantity_installment_period,\n quantity_schedule_type,\n quantity_unit_of_measure,\n record_type_id,\n revenue_installment_period,\n revenue_schedule_type\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__opportunity_line_item": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__opportunity_line_item", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__opportunity_line_item.sql", "original_file_path": "models/salesforce/stg_salesforce__opportunity_line_item.sql", "unique_id": "model.salesforce_source.stg_salesforce__opportunity_line_item", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__opportunity_line_item"], "alias": "stg_salesforce__opportunity_line_item", "checksum": {"name": "sha256", "checksum": "89d9b0f3bc331dd0bf15d6a991259e989545da07a6dbe949668aa63af3375914"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Represents an opportunity line item, which is a member of the list of Product2 products associated with an Opportunity.", "columns": {"opportunity_line_item_id": {"name": "opportunity_line_item_id", "description": "Line Item ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_line_item_description": {"name": "opportunity_line_item_description", "description": "Text description of the opportunity line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "discount": {"name": "discount", "description": "Discount for the product as a percentage. When updating these records: If you specify Discount without specifying TotalPrice, the TotalPrice is adjusted to accommodate the new Discount value, and the UnitPrice is held constant. If you specify both Discount and Quantity, you must also specify either TotalPrice or UnitPrice so the system knows which one to automatically adjust.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_quantity_schedule": {"name": "has_quantity_schedule", "description": "Read-only. Indicates whether a quantity schedule has been created for this object (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_revenue_schedule": {"name": "has_revenue_schedule", "description": "Indicates whether a revenue schedule has been created for this object (true) or not (false). If this object has a revenue schedule, the Quantity and TotalPrice fields can\u2019t be updated. In addition, the Quantity field can\u2019t be updated if this object has a quantity schedule. Update requests aren\u2019t rejected but the updated values are ignored.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_schedule": {"name": "has_schedule", "description": "If either HasQuantitySchedule or HasRevenueSchedule is true, this field is also true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp for when the current user last viewed a record related to this record. Available in API version 50.0 and later.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced (LastReferencedDate) and not viewed. Available in API version 50.0 and later.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "list_price": {"name": "list_price", "description": "Corresponds to the UnitPrice on the PricebookEntry that is associated with this line item, which can be in the standard price book or a custom price book. A client application can use this information to show whether the unit price (or sales price) of the line item differs from the price book entry list price.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_line_item_name": {"name": "opportunity_line_item_name", "description": "The opportunity line item name (known as \u201cOpportunity Product\u201d in the user interface). This read-only field is available in API version 30.0 and later.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_id": {"name": "opportunity_id", "description": "Required. ID of the associated Opportunity. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "pricebook_entry_id": {"name": "pricebook_entry_id", "description": "Required. ID of the associated PricebookEntry. Exists only for those organizations that have Products enabled as a feature. In API versions 1.0 and 2.0, you can specify values for either this field or ProductId, but not both. For this reason, both fields are declared nillable. In API version 3.0 and later, you must specify values for this field instead of ProductId. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "product_2_id": {"name": "product_2_id", "description": "The ID of the related Product2 record. This is a read-only field available in API version 30.0 and later. Use the PricebookEntryId field instead, specifying the ID of the PricebookEntry record.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "product_code": {"name": "product_code", "description": "This read-only field is available in API version 30.0 and later. It references the value in the ProductCode field of the related Product2 record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "Read-only if this record has a quantity schedule, a revenue schedule, or both a quantity and a revenue schedule. When updating these records: If you specify Quantity without specifying the UnitPrice, the UnitPrice value will be adjusted to accommodate the new Quantity value, and the TotalPrice will be held constant. If you specify both Discount and Quantity, you must also specify either TotalPrice or UnitPrice so the system can determine which one to automatically adjust.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "service_date": {"name": "service_date", "description": "Date when the product revenue will be recognized and the product quantity will be shipped. Opportunity Close Date\u2014ServiceDate is ignored. Product Date\u2014ServiceDate is used if not null. Schedule Date\u2014ServiceDate is used if not null and there are no revenue schedules present for this line item, that is, there are no OpportunityLineItemSchedule records with a field Type value of Revenue that are children of this record.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sort_order": {"name": "sort_order", "description": "Number indicating the sort order selected by the user. Client applications can use this to match the sort order in Salesforce.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "This field is available only for backward compatibility. It represents the total price of the OpportunityLineItem. If you do not specify UnitPrice, this field is required. If you specify Discount and Quantity, this field or UnitPrice is required. When updating these records, you can change either this value or the UnitPrice, but not both at the same time.\nThis field is nullable, but you can\u2019t set both TotalPrice and UnitPrice to null in the same update request. To insert the TotalPrice via the API (given only a unit price and the quantity), calculate this field as the unit price multiplied by the quantity. This field is read-only if the opportunity line item has a revenue schedule. If the opportunity line item does not have a schedule or only has quantity schedule, this field can be updated.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "unit_price": {"name": "unit_price", "description": "The unit price for the opportunity line item. In the Salesforce user interface, this field\u2019s value is calculated by dividing the total price of the opportunity line item by the quantity listed for that line item. Label is Sales Price. This field or TotalPrice is required. You can\u2019t specify both.\nIf you specify Discount and Quantity, this field or TotalPrice is required.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "enabled": true}, "created_at": 1698690621.833911, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__opportunity_line_item\"", "raw_code": "--To disable this model, set the salesforce__opportunity_line_item_enabled variable within your dbt_project.yml file to False.\n{{ config(enabled=var('salesforce__opportunity_line_item_enabled', True)) }}\n\nwith fields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','opportunity_line_item')),\n staging_columns=get_opportunity_line_item_columns()\n )\n }}\n \n from {{ source('salesforce','opportunity_line_item') }}\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as opportunity_line_item_id,\n created_by_id,\n cast(created_date as {{ dbt.type_timestamp() }}) as created_date,\n description as opportunity_line_item_description,\n discount,\n has_quantity_schedule,\n has_revenue_schedule,\n has_schedule,\n is_deleted,\n last_modified_by_id,\n cast(last_modified_date as {{ dbt.type_timestamp() }}) as last_modified_date,\n cast(last_referenced_date as {{ dbt.type_timestamp() }}) as last_referenced_date,\n cast(last_viewed_date as {{ dbt.type_timestamp() }}) as last_viewed_date,\n list_price,\n name as opportunity_line_item_name,\n opportunity_id,\n pricebook_entry_id,\n product_2_id,\n product_code,\n quantity,\n cast(service_date as {{ dbt.type_timestamp() }}) as service_date,\n sort_order,\n total_price,\n unit_price\n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__opportunity_line_item_pass_through_columns') }}\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "language": "sql", "refs": [], "sources": [["salesforce", "opportunity_line_item"], ["salesforce", "opportunity_line_item"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_opportunity_line_item_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["source.salesforce_source.salesforce.opportunity_line_item"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__opportunity_line_item.sql", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__opportunity_line_item_enabled variable within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n created_by_id\n \n as \n \n created_by_id\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n discount\n \n as \n \n discount\n \n, \n \n \n has_quantity_schedule\n \n as \n \n has_quantity_schedule\n \n, \n \n \n has_revenue_schedule\n \n as \n \n has_revenue_schedule\n \n, \n \n \n has_schedule\n \n as \n \n has_schedule\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n list_price\n \n as \n \n list_price\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n opportunity_id\n \n as \n \n opportunity_id\n \n, \n \n \n pricebook_entry_id\n \n as \n \n pricebook_entry_id\n \n, \n \n \n product_2_id\n \n as \n \n product_2_id\n \n, \n \n \n product_code\n \n as \n \n product_code\n \n, \n \n \n quantity\n \n as \n \n quantity\n \n, \n \n \n service_date\n \n as \n \n service_date\n \n, \n \n \n sort_order\n \n as \n \n sort_order\n \n, \n \n \n total_price\n \n as \n \n total_price\n \n, \n \n \n unit_price\n \n as \n \n unit_price\n \n\n\n\n \n from \"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_opportunity_line_item_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as TIMESTAMP) as _fivetran_synced,\n id as opportunity_line_item_id,\n created_by_id,\n cast(created_date as TIMESTAMP) as created_date,\n description as opportunity_line_item_description,\n discount,\n has_quantity_schedule,\n has_revenue_schedule,\n has_schedule,\n is_deleted,\n last_modified_by_id,\n cast(last_modified_date as TIMESTAMP) as last_modified_date,\n cast(last_referenced_date as TIMESTAMP) as last_referenced_date,\n cast(last_viewed_date as TIMESTAMP) as last_viewed_date,\n list_price,\n name as opportunity_line_item_name,\n opportunity_id,\n pricebook_entry_id,\n product_2_id,\n product_code,\n quantity,\n cast(service_date as TIMESTAMP) as service_date,\n sort_order,\n total_price,\n unit_price\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__user": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__user", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__user.sql", "original_file_path": "models/salesforce/stg_salesforce__user.sql", "unique_id": "model.salesforce_source.stg_salesforce__user", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__user"], "alias": "stg_salesforce__user", "checksum": {"name": "sha256", "checksum": "8c67323405cb7b47f11ef84d25f802dd723703543395253f905eb6e8751193a7"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Represents a user in your organization.", "columns": {"user_id": {"name": "user_id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "True, if this field has been deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "about_me": {"name": "about_me", "description": "Information about the user, such as areas of interest or skills.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "ID of the Account associated with a Customer Portal user. This field is null for Salesforce users.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "alias": {"name": "alias", "description": "Required. The user\u2019s alias. For example, jsmith.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "badge_text": {"name": "badge_text", "description": "The community role, displayed on the user profile page just below the user name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "banner_photo_url": {"name": "banner_photo_url", "description": "The URL for the user's banner photo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "call_center_id": {"name": "call_center_id", "description": "If Salesforce CRM Call Center is enabled, represents the call center to which this user is assigned.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "city": {"name": "city", "description": "The city associated with the user. Up to 40 characters allowed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "community_nickname": {"name": "community_nickname", "description": "Name used to identify this user in the Community application, which includes the ideas and answers features.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "company_name": {"name": "company_name", "description": "The name of the user\u2019s company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "contact_id": {"name": "contact_id", "description": "ID of the Contact associated with this account. The contact must have a value in the AccountId field or an error occurs.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "country": {"name": "country", "description": "The country associated with the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "country_code": {"name": "country_code", "description": "The ISO country code associated with the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "default_group_notification_frequency": {"name": "default_group_notification_frequency", "description": "The default frequency for sending the user's Chatter group email notifications when the user joins groups.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "delegated_approver_id": {"name": "delegated_approver_id", "description": "Id of the user who is a delegated approver for this user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "department": {"name": "department", "description": "The company department associated with the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "digest_frequency": {"name": "digest_frequency", "description": "The frequency at which the system sends the user\u2019s Chatter personal email digest.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "division": {"name": "division", "description": "The division associated with this user, similar to Department and unrelated to DefaultDivision.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "Required. The user\u2019s email address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email_encoding_key": {"name": "email_encoding_key", "description": "Required. The email encoding for the user, such as ISO-8859-1 or UTF-8.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email_preferences_auto_bcc": {"name": "email_preferences_auto_bcc", "description": "Determines whether the user receives copies of sent emails. This option applies only if compliance BCC emails are not enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "employee_number": {"name": "employee_number", "description": "The user\u2019s employee number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "extension": {"name": "extension", "description": "The user\u2019s phone extension number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fax": {"name": "fax", "description": "The user\u2019s fax number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "federation_identifier": {"name": "federation_identifier", "description": "Indicates the value that must be listed in the Subject element of a Security Assertion Markup Language (SAML) IDP certificate to authenticate the user for a client application using single sign-on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The user\u2019s first name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_enabled": {"name": "forecast_enabled", "description": "Indicates whether the user is enabled as a forecast manager (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "full_photo_url": {"name": "full_photo_url", "description": "The URL for the user's profile photo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "geocode_accuracy": {"name": "geocode_accuracy", "description": "The level of accuracy of a location\u2019s geographical coordinates compared with its physical address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "individual_id": {"name": "individual_id", "description": "ID of the data privacy record associated with this user. This field is available if Data Protection and Privacy is enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_active": {"name": "is_active", "description": "Indicates whether the user has access to log in (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_profile_photo_active": {"name": "is_profile_photo_active", "description": "Indicates whether a user has a profile photo (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "language_locale_key": {"name": "language_locale_key", "description": "Required. The user\u2019s language, such as \u201cFrench\u201d or \u201cChinese (Traditional).\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_login_date": {"name": "last_login_date", "description": "The date and time when the user last successfully logged in. This value is updated if 60 seconds have elapsed since the user\u2019s last login.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "Required. The user\u2019s last name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp for when the current user last viewed a record related to this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced (LastReferencedDate) and not viewed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Used with Longitude to specify the precise geolocation of an address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "locale_sid_key": {"name": "locale_sid_key", "description": "Required. This field is a restricted picklist field. The value of the field affects formatting and parsing of values, especially numeric values, in the user interface.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Used with Latitude to specify the precise geolocation of an address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "manager_id": {"name": "manager_id", "description": "The Id of the user who manages this user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "medium_banner_photo_url": {"name": "medium_banner_photo_url", "description": "The URL for the medium-sized user profile banner photo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mobile_phone": {"name": "mobile_phone", "description": "The user\u2019s mobile or cellular phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "user_name": {"name": "user_name", "description": "Concatenation of FirstName and LastName.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "offline_trial_expiration_date": {"name": "offline_trial_expiration_date", "description": "The date and time when the user\u2019s Connect Offline trial expires.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "phone": {"name": "phone", "description": "The user\u2019s phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "postal_code": {"name": "postal_code", "description": "The user\u2019s postal or ZIP code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "profile_id": {"name": "profile_id", "description": "Required. ID of the user\u2019s Profile. Use this value to cache metadata based on profile. In earlier releases, this was RoleId.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "receives_admin_info_emails": {"name": "receives_admin_info_emails", "description": "Indicates whether the user receives email for administrators from Salesforce (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "receives_info_emails": {"name": "receives_info_emails", "description": "Indicates whether the user receives informational email from Salesforce (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sender_email": {"name": "sender_email", "description": "The email address used as the From address when the user sends emails. This address is the same value shown in Setup on the My Email Settings page.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sender_name": {"name": "sender_name", "description": "The name used as the email sender when the user sends emails. This name is the same value shown in Setup on the My Email Settings page.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "signature": {"name": "signature", "description": "The signature text added to emails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "small_banner_photo_url": {"name": "small_banner_photo_url", "description": "The URL for the small user profile banner photo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "small_photo_url": {"name": "small_photo_url", "description": "The URL for a thumbnail of the user's profile photo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "state": {"name": "state", "description": "The state associated with the User.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "state_code": {"name": "state_code", "description": "The ISO state code associated with the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "street": {"name": "street", "description": "The street address associated with the User.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_zone_sid_key": {"name": "time_zone_sid_key", "description": "Required. This field is a restricted picklist field. A User time zone affects the offset used when displaying or entering times in the user interface.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "title": {"name": "title", "description": "The user\u2019s business title, such as \u201cVice President.\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "username": {"name": "username", "description": "Contains the name that a user enters to log in. The value for this field must be in the form of an email address, using all lowercase characters. It must also be unique across all organizations.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "user_role_id": {"name": "user_role_id", "description": "ID of the user\u2019s UserRole.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "user_type": {"name": "user_type", "description": "The category of user license.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table"}, "created_at": 1698690621.8186529, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__user\"", "raw_code": "with fields as (\n\n select\n\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','user')),\n staging_columns=get_user_columns()\n )\n }}\n\n from {{ source('salesforce','user') }}\n), \n\nfinal as (\n \n select \n _fivetran_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n account_id,\n alias,\n city,\n company_name,\n contact_id,\n country,\n country_code,\n department,\n email,\n first_name,\n id as user_id,\n individual_id,\n is_active,\n cast(last_login_date as {{ dbt.type_timestamp() }}) as last_login_date,\n last_name,\n cast(last_referenced_date as {{ dbt.type_timestamp() }}) as last_referenced_date,\n cast(last_viewed_date as {{ dbt.type_timestamp() }}) as last_viewed_date,\n manager_id,\n name as user_name,\n postal_code,\n profile_id,\n state,\n state_code,\n street,\n title,\n user_role_id,\n user_type,\n username \n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__user_pass_through_columns') }}\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect * \nfrom final", "language": "sql", "refs": [], "sources": [["salesforce", "user"], ["salesforce", "user"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_user_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["source.salesforce_source.salesforce.user"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__user.sql", "compiled": true, "compiled_code": "with fields as (\n\n select\n\n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n account_id\n \n as \n \n account_id\n \n, \n \n \n alias\n \n as \n \n alias\n \n, \n \n \n city\n \n as \n \n city\n \n, \n \n \n company_name\n \n as \n \n company_name\n \n, \n \n \n contact_id\n \n as \n \n contact_id\n \n, \n \n \n country\n \n as \n \n country\n \n, \n \n \n country_code\n \n as \n \n country_code\n \n, \n \n \n department\n \n as \n \n department\n \n, \n \n \n email\n \n as \n \n email\n \n, \n \n \n first_name\n \n as \n \n first_name\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n individual_id\n \n as \n \n individual_id\n \n, \n \n \n is_active\n \n as \n \n is_active\n \n, \n \n \n last_login_date\n \n as \n \n last_login_date\n \n, \n \n \n last_name\n \n as \n \n last_name\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n manager_id\n \n as \n \n manager_id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n postal_code\n \n as \n \n postal_code\n \n, \n \n \n profile_id\n \n as \n \n profile_id\n \n, \n \n \n state\n \n as \n \n state\n \n, \n \n \n state_code\n \n as \n \n state_code\n \n, \n \n \n street\n \n as \n \n street\n \n, \n \n \n title\n \n as \n \n title\n \n, \n \n \n user_role_id\n \n as \n \n user_role_id\n \n, \n \n \n user_type\n \n as \n \n user_type\n \n, \n \n \n username\n \n as \n \n username\n \n\n\n\n\n from \"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_user_data\"\n), \n\nfinal as (\n \n select \n _fivetran_deleted,\n cast(_fivetran_synced as TIMESTAMP) as _fivetran_synced,\n account_id,\n alias,\n city,\n company_name,\n contact_id,\n country,\n country_code,\n department,\n email,\n first_name,\n id as user_id,\n individual_id,\n is_active,\n cast(last_login_date as TIMESTAMP) as last_login_date,\n last_name,\n cast(last_referenced_date as TIMESTAMP) as last_referenced_date,\n cast(last_viewed_date as TIMESTAMP) as last_viewed_date,\n manager_id,\n name as user_name,\n postal_code,\n profile_id,\n state,\n state_code,\n street,\n title,\n user_role_id,\n user_type,\n username \n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__task": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "stg_salesforce__task", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__task.sql", "original_file_path": "models/salesforce/stg_salesforce__task.sql", "unique_id": "model.salesforce_source.stg_salesforce__task", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__task"], "alias": "stg_salesforce__task", "checksum": {"name": "sha256", "checksum": "070a535f7b6ff4bdd6ddc5eca09e04a22e63d8dae98c003b977901b008c5b37d"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": null, "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false}, "post-hook": [], "pre-hook": []}, "tags": [], "description": "Represents a business activity such as making a phone call or other to-do items. In the user interface, Task and Event records are collectively referred to as activities.", "columns": {"task_id": {"name": "task_id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "Represents the ID of the related Account. The AccountId is determined as follows. If the value of WhatId is any of the following objects, then Salesforce uses that object\u2019s AccountId. Account Opportunity Contract Custom object that is a child of Account If the value of the WhatIdfield is any other object, and the value of the WhoId field is a Contact object, then Salesforce uses that contact\u2019s AccountId. (If your organization uses Shared Activities, then Salesforce uses the AccountId of the primary contact.) Otherwise, Salesforce sets the value of the AccountId field to null. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "activity_date": {"name": "activity_date", "description": "Represents the due date of the task. This field has a timestamp that is always set to midnight in the Coordinated Universal Time (UTC) time zone. The timestamp is not relevant; do not attempt to alter it to accommodate time zone differences. Label is Due Date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "call_disposition": {"name": "call_disposition", "description": "Represents the result of a given call, for example, \u201cwe'll call back,\u201d or \u201ccall unsuccessful.\u201d Limit is 255 characters. Not subject to field-level security, available for any user in an organization with Salesforce CRM Call Center.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "call_duration_in_seconds": {"name": "call_duration_in_seconds", "description": "Duration of the call in seconds. Not subject to field-level security, available for any user in an organization with Salesforce CRM Call Center.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "call_object": {"name": "call_object", "description": "Name of a call center. Limit is 255 characters. Not subject to field-level security, available for any user in an organization with Salesforce CRM Call Center.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "call_type": {"name": "call_type", "description": "The type of call being answered: Inbound, Internal, or Outbound.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "completed_date_time": {"name": "completed_date_time", "description": "The date and time the task was saved with a Closed status. For insert, if the task is saved with a Closed status the field is set. If the task is saved with an Open status the field is set to NULL. For update, if the task is saved with a new Closed status, the field is reset. If the task is saved with a new non-closed status, the field is reset to NULL. If the task is saved with the same closed status (that is, unchanged) there is no change to the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "task_description": {"name": "task_description", "description": "Contains a text description of the task.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_archived": {"name": "is_archived", "description": "Indicates whether the event has been archived.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_closed": {"name": "is_closed", "description": "Indicates whether the task has been completed (true) or not (false). Is only set indirectly via the Status picklist. Label is Closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_high_priority": {"name": "is_high_priority", "description": "Indicates a high-priority task. This field is derived from the Priority field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "ID of the User or Group who owns the record. Label is Assigned To ID. This field accepts Groups of type Queue only. In the user interface, Group IDs correspond with the queue\u2019s list view names. To create or update tasks assigned to Group, use v48.0 or later. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "priority": {"name": "priority", "description": "Required. Indicates the importance or urgency of a task, such as high or low.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"name": "status", "description": "Required. The status of the task, such as In Progress or Completed. Each predefined Status field implies a value for the IsClosed flag. To obtain picklist values, query the TaskStatus object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "subject": {"name": "subject", "description": "The subject line of the task, such as \u201cCall\u201d or \u201cSend Quote.\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "system_modstamp": {"name": "system_modstamp", "description": "System Modstamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "task_subtype": {"name": "task_subtype", "description": "Provides standard subtypes to facilitate creating and searching for specific task subtypes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "The type of task, such as Call or Meeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "what_count": {"name": "what_count", "description": "Available to organizations that have Shared Activities enabled. Count of related TaskRelations pertaining to WhatId. Count of the WhatId must be 1 or less.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "what_id": {"name": "what_id", "description": "The WhatId represents nonhuman objects such as accounts, opportunities, campaigns, cases, or custom objects. WhatIds are polymorphic. Polymorphic means a WhatId is equivalent to the ID of a related object. The label is Related To ID. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "who_count": {"name": "who_count", "description": "Available to organizations that have Shared Activities enabled. Count of related TaskRelations pertaining to WhoId.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "who_id": {"name": "who_id", "description": "The WhoId represents a human such as a lead or a contact. WhoIds are polymorphic. Polymorphic means a WhoId is equivalent to a contact\u2019s ID or a lead\u2019s ID. The label is Name ID. If Shared Activities is enabled, the value of this field is the ID of the related lead or primary contact. If you add, update, or remove the WhoId field, you might encounter problems with triggers, workflows, and data validation rules that are associated with the record. The label is Name ID. Beginning in API version 37.0, if the contact or lead ID in the WhoId field is not in the TaskWhoIds list, no error occurs and the ID is added to the TaskWhoIds as the primary WhoId. If WhoId is set to null, an arbitrary ID from the existing TaskWhoIds list is promoted to the primary position.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "table", "enabled": true}, "created_at": 1698690621.8421419, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__task\"", "raw_code": "--To disable this model, set the salesforce__task_enabled variable within your dbt_project.yml file to False.\n{{ config(enabled=var('salesforce__task_enabled', True)) }}\n\nwith fields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','task')),\n staging_columns=get_task_columns()\n )\n }}\n \n from {{ source('salesforce','task') }}\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n id as task_id,\n account_id,\n cast(activity_date as {{ dbt.type_timestamp() }}) as activity_date,\n call_disposition,\n call_duration_in_seconds,\n call_object,\n call_type,\n cast(completed_date_time as {{ dbt.type_timestamp() }}) as completed_date_time,\n created_by_id,\n cast(created_date as {{ dbt.type_timestamp() }}) as created_date,\n description as task_description,\n is_archived,\n is_closed,\n is_deleted,\n is_high_priority,\n last_modified_by_id,\n cast(last_modified_date as {{ dbt.type_timestamp() }}) as last_modified_date,\n owner_id,\n priority,\n record_type_id,\n status,\n subject,\n task_subtype,\n type,\n what_count,\n what_id,\n who_count,\n who_id\n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__task_pass_through_columns') }}\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "language": "sql", "refs": [], "sources": [["salesforce", "task"], ["salesforce", "task"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_task_columns", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["source.salesforce_source.salesforce.task"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__task.sql", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__task_enabled variable within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n account_id\n \n as \n \n account_id\n \n, \n \n \n activity_date\n \n as \n \n activity_date\n \n, \n \n \n call_disposition\n \n as \n \n call_disposition\n \n, \n \n \n call_duration_in_seconds\n \n as \n \n call_duration_in_seconds\n \n, \n \n \n call_object\n \n as \n \n call_object\n \n, \n \n \n call_type\n \n as \n \n call_type\n \n, \n \n \n completed_date_time\n \n as \n \n completed_date_time\n \n, \n \n \n created_by_id\n \n as \n \n created_by_id\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_archived\n \n as \n \n is_archived\n \n, \n \n \n is_closed\n \n as \n \n is_closed\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n is_high_priority\n \n as \n \n is_high_priority\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n priority\n \n as \n \n priority\n \n, \n \n \n record_type_id\n \n as \n \n record_type_id\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n subject\n \n as \n \n subject\n \n, \n \n \n task_subtype\n \n as \n \n task_subtype\n \n, \n \n \n type\n \n as \n \n type\n \n, \n \n \n what_count\n \n as \n \n what_count\n \n, \n \n \n what_id\n \n as \n \n what_id\n \n, \n \n \n who_count\n \n as \n \n who_count\n \n, \n \n \n who_id\n \n as \n \n who_id\n \n\n\n\n \n from \"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_task_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as TIMESTAMP) as _fivetran_synced,\n id as task_id,\n account_id,\n cast(activity_date as TIMESTAMP) as activity_date,\n call_disposition,\n call_duration_in_seconds,\n call_object,\n call_type,\n cast(completed_date_time as TIMESTAMP) as completed_date_time,\n created_by_id,\n cast(created_date as TIMESTAMP) as created_date,\n description as task_description,\n is_archived,\n is_closed,\n is_deleted,\n is_high_priority,\n last_modified_by_id,\n cast(last_modified_date as TIMESTAMP) as last_modified_date,\n owner_id,\n priority,\n record_type_id,\n status,\n subject,\n task_subtype,\n type,\n what_count,\n what_id,\n who_count,\n who_id\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "test.salesforce_source.not_null_stg_salesforce__account_history_history_unique_key.e946c6dd0e": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "history_unique_key", "model": "{{ get_where_subquery(ref('stg_salesforce__account_history')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "not_null_stg_salesforce__account_history_history_unique_key", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__account_history_history_unique_key.sql", "original_file_path": "models/salesforce_history/stg_salesforce_history.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__account_history_history_unique_key.e946c6dd0e", "fqn": ["salesforce_source", "salesforce_history", "not_null_stg_salesforce__account_history_history_unique_key"], "alias": "not_null_stg_salesforce__account_history_history_unique_key", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.771817, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__account_history"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce_history/stg_salesforce_history.yml/not_null_stg_salesforce__account_history_history_unique_key.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect history_unique_key\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__account_history\"\nwhere history_unique_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "history_unique_key", "file_key_name": "models.stg_salesforce__account_history", "attached_node": "model.salesforce_source.stg_salesforce__account_history"}, "test.salesforce_source.unique_stg_salesforce__account_history_history_unique_key.c378da769f": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "history_unique_key", "model": "{{ get_where_subquery(ref('stg_salesforce__account_history')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "unique_stg_salesforce__account_history_history_unique_key", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__account_history_history_unique_key.sql", "original_file_path": "models/salesforce_history/stg_salesforce_history.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__account_history_history_unique_key.c378da769f", "fqn": ["salesforce_source", "salesforce_history", "unique_stg_salesforce__account_history_history_unique_key"], "alias": "unique_stg_salesforce__account_history_history_unique_key", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.7735739, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__account_history"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce_history/stg_salesforce_history.yml/unique_stg_salesforce__account_history_history_unique_key.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n history_unique_key as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__account_history\"\nwhere history_unique_key is not null\ngroup by history_unique_key\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "history_unique_key", "file_key_name": "models.stg_salesforce__account_history", "attached_node": "model.salesforce_source.stg_salesforce__account_history"}, "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__account_history_account_id___fivetran_start___fivetran_end.7db755dfc6": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["account_id", "_fivetran_start", "_fivetran_end"], "model": "{{ get_where_subquery(ref('stg_salesforce__account_history')) }}"}, "namespace": "dbt_utils"}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "dbt_utils_unique_combination_of_columns_stg_salesforce__account_history_account_id___fivetran_start___fivetran_end", "resource_type": "test", "package_name": "salesforce_source", "path": "dbt_utils_unique_combination_o_1ba018981642a994c5b439e57bcdab6b.sql", "original_file_path": "models/salesforce_history/stg_salesforce_history.yml", "unique_id": "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__account_history_account_id___fivetran_start___fivetran_end.7db755dfc6", "fqn": ["salesforce_source", "salesforce_history", "dbt_utils_unique_combination_of_columns_stg_salesforce__account_history_account_id___fivetran_start___fivetran_end"], "alias": "dbt_utils_unique_combination_o_1ba018981642a994c5b439e57bcdab6b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_1ba018981642a994c5b439e57bcdab6b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_1ba018981642a994c5b439e57bcdab6b"}, "created_at": 1698690621.7744799, "relation_name": null, "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_1ba018981642a994c5b439e57bcdab6b\") }}", "language": "sql", "refs": [{"name": "stg_salesforce__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__account_history"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce_history/stg_salesforce_history.yml/dbt_utils_unique_combination_o_1ba018981642a994c5b439e57bcdab6b.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n account_id, _fivetran_start, _fivetran_end\n from \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__account_history\"\n group by account_id, _fivetran_start, _fivetran_end\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": null, "file_key_name": "models.stg_salesforce__account_history", "attached_node": "model.salesforce_source.stg_salesforce__account_history"}, "test.salesforce_source.not_null_stg_salesforce__contact_history_history_unique_key.673cb181cf": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "history_unique_key", "model": "{{ get_where_subquery(ref('stg_salesforce__contact_history')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "not_null_stg_salesforce__contact_history_history_unique_key", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__contact_history_history_unique_key.sql", "original_file_path": "models/salesforce_history/stg_salesforce_history.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__contact_history_history_unique_key.673cb181cf", "fqn": ["salesforce_source", "salesforce_history", "not_null_stg_salesforce__contact_history_history_unique_key"], "alias": "not_null_stg_salesforce__contact_history_history_unique_key", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.7813199, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__contact_history"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce_history/stg_salesforce_history.yml/not_null_stg_salesforce__contact_history_history_unique_key.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect history_unique_key\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__contact_history\"\nwhere history_unique_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "history_unique_key", "file_key_name": "models.stg_salesforce__contact_history", "attached_node": "model.salesforce_source.stg_salesforce__contact_history"}, "test.salesforce_source.unique_stg_salesforce__contact_history_history_unique_key.215181e10d": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "history_unique_key", "model": "{{ get_where_subquery(ref('stg_salesforce__contact_history')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "unique_stg_salesforce__contact_history_history_unique_key", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__contact_history_history_unique_key.sql", "original_file_path": "models/salesforce_history/stg_salesforce_history.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__contact_history_history_unique_key.215181e10d", "fqn": ["salesforce_source", "salesforce_history", "unique_stg_salesforce__contact_history_history_unique_key"], "alias": "unique_stg_salesforce__contact_history_history_unique_key", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.782367, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__contact_history"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce_history/stg_salesforce_history.yml/unique_stg_salesforce__contact_history_history_unique_key.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n history_unique_key as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__contact_history\"\nwhere history_unique_key is not null\ngroup by history_unique_key\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "history_unique_key", "file_key_name": "models.stg_salesforce__contact_history", "attached_node": "model.salesforce_source.stg_salesforce__contact_history"}, "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__contact_history_contact_id___fivetran_start___fivetran_end.2d7ff092ee": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["contact_id", "_fivetran_start", "_fivetran_end"], "model": "{{ get_where_subquery(ref('stg_salesforce__contact_history')) }}"}, "namespace": "dbt_utils"}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "dbt_utils_unique_combination_of_columns_stg_salesforce__contact_history_contact_id___fivetran_start___fivetran_end", "resource_type": "test", "package_name": "salesforce_source", "path": "dbt_utils_unique_combination_o_8338e0f8a1f58c9bf73432eac5cc75b2.sql", "original_file_path": "models/salesforce_history/stg_salesforce_history.yml", "unique_id": "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__contact_history_contact_id___fivetran_start___fivetran_end.2d7ff092ee", "fqn": ["salesforce_source", "salesforce_history", "dbt_utils_unique_combination_of_columns_stg_salesforce__contact_history_contact_id___fivetran_start___fivetran_end"], "alias": "dbt_utils_unique_combination_o_8338e0f8a1f58c9bf73432eac5cc75b2", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_8338e0f8a1f58c9bf73432eac5cc75b2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_8338e0f8a1f58c9bf73432eac5cc75b2"}, "created_at": 1698690621.7841868, "relation_name": null, "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8338e0f8a1f58c9bf73432eac5cc75b2\") }}", "language": "sql", "refs": [{"name": "stg_salesforce__contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__contact_history"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce_history/stg_salesforce_history.yml/dbt_utils_unique_combination_o_8338e0f8a1f58c9bf73432eac5cc75b2.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n contact_id, _fivetran_start, _fivetran_end\n from \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__contact_history\"\n group by contact_id, _fivetran_start, _fivetran_end\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": null, "file_key_name": "models.stg_salesforce__contact_history", "attached_node": "model.salesforce_source.stg_salesforce__contact_history"}, "test.salesforce_source.not_null_stg_salesforce__opportunity_history_history_unique_key.32fa6270e0": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "history_unique_key", "model": "{{ get_where_subquery(ref('stg_salesforce__opportunity_history')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "not_null_stg_salesforce__opportunity_history_history_unique_key", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__opportunity_history_history_unique_key.sql", "original_file_path": "models/salesforce_history/stg_salesforce_history.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__opportunity_history_history_unique_key.32fa6270e0", "fqn": ["salesforce_source", "salesforce_history", "not_null_stg_salesforce__opportunity_history_history_unique_key"], "alias": "not_null_stg_salesforce__opportunity_history_history_unique_key", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.786749, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__opportunity_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__opportunity_history"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce_history/stg_salesforce_history.yml/not_null_stg_salesforce__opportunity_history_history_unique_key.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect history_unique_key\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__opportunity_history\"\nwhere history_unique_key is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "history_unique_key", "file_key_name": "models.stg_salesforce__opportunity_history", "attached_node": "model.salesforce_source.stg_salesforce__opportunity_history"}, "test.salesforce_source.unique_stg_salesforce__opportunity_history_history_unique_key.b5b08bda67": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "history_unique_key", "model": "{{ get_where_subquery(ref('stg_salesforce__opportunity_history')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "unique_stg_salesforce__opportunity_history_history_unique_key", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__opportunity_history_history_unique_key.sql", "original_file_path": "models/salesforce_history/stg_salesforce_history.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__opportunity_history_history_unique_key.b5b08bda67", "fqn": ["salesforce_source", "salesforce_history", "unique_stg_salesforce__opportunity_history_history_unique_key"], "alias": "unique_stg_salesforce__opportunity_history_history_unique_key", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.787625, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__opportunity_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__opportunity_history"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce_history/stg_salesforce_history.yml/unique_stg_salesforce__opportunity_history_history_unique_key.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n history_unique_key as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__opportunity_history\"\nwhere history_unique_key is not null\ngroup by history_unique_key\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "history_unique_key", "file_key_name": "models.stg_salesforce__opportunity_history", "attached_node": "model.salesforce_source.stg_salesforce__opportunity_history"}, "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__opportunity_history_opportunity_id___fivetran_start___fivetran_end.1209811435": {"test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["opportunity_id", "_fivetran_start", "_fivetran_end"], "model": "{{ get_where_subquery(ref('stg_salesforce__opportunity_history')) }}"}, "namespace": "dbt_utils"}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "dbt_utils_unique_combination_of_columns_stg_salesforce__opportunity_history_opportunity_id___fivetran_start___fivetran_end", "resource_type": "test", "package_name": "salesforce_source", "path": "dbt_utils_unique_combination_o_6a5f6a74dbae2db6a4bb18ed90b8a8e9.sql", "original_file_path": "models/salesforce_history/stg_salesforce_history.yml", "unique_id": "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__opportunity_history_opportunity_id___fivetran_start___fivetran_end.1209811435", "fqn": ["salesforce_source", "salesforce_history", "dbt_utils_unique_combination_of_columns_stg_salesforce__opportunity_history_opportunity_id___fivetran_start___fivetran_end"], "alias": "dbt_utils_unique_combination_o_6a5f6a74dbae2db6a4bb18ed90b8a8e9", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "dbt_utils_unique_combination_o_6a5f6a74dbae2db6a4bb18ed90b8a8e9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"alias": "dbt_utils_unique_combination_o_6a5f6a74dbae2db6a4bb18ed90b8a8e9"}, "created_at": 1698690621.788488, "relation_name": null, "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_6a5f6a74dbae2db6a4bb18ed90b8a8e9\") }}", "language": "sql", "refs": [{"name": "stg_salesforce__opportunity_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__opportunity_history"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce_history/stg_salesforce_history.yml/dbt_utils_unique_combination_o_6a5f6a74dbae2db6a4bb18ed90b8a8e9.sql", "compiled": true, "compiled_code": "\n\n\n\n\n\nwith validation_errors as (\n\n select\n opportunity_id, _fivetran_start, _fivetran_end\n from \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__opportunity_history\"\n group by opportunity_id, _fivetran_start, _fivetran_end\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": null, "file_key_name": "models.stg_salesforce__opportunity_history", "attached_node": "model.salesforce_source.stg_salesforce__opportunity_history"}, "test.salesforce_source.not_null_stg_salesforce__account_account_id.1e0ff361d4": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_salesforce__account')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "not_null_stg_salesforce__account_account_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__account_account_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__account_account_id.1e0ff361d4", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__account_account_id"], "alias": "not_null_stg_salesforce__account_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.842617, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__account", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__account"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__account_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__account\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_salesforce__account", "attached_node": "model.salesforce_source.stg_salesforce__account"}, "test.salesforce_source.unique_stg_salesforce__account_account_id.6d58a39ba7": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_salesforce__account')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "unique_stg_salesforce__account_account_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__account_account_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__account_account_id.6d58a39ba7", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__account_account_id"], "alias": "unique_stg_salesforce__account_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.8436081, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__account", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__account"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__account_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n account_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__account\"\nwhere account_id is not null\ngroup by account_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_salesforce__account", "attached_node": "model.salesforce_source.stg_salesforce__account"}, "test.salesforce_source.not_null_stg_salesforce__opportunity_opportunity_id.234c5e60bd": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "opportunity_id", "model": "{{ get_where_subquery(ref('stg_salesforce__opportunity')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "not_null_stg_salesforce__opportunity_opportunity_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__opportunity_opportunity_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__opportunity_opportunity_id.234c5e60bd", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__opportunity_opportunity_id"], "alias": "not_null_stg_salesforce__opportunity_opportunity_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.844469, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__opportunity", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__opportunity"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__opportunity_opportunity_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect opportunity_id\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__opportunity\"\nwhere opportunity_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "opportunity_id", "file_key_name": "models.stg_salesforce__opportunity", "attached_node": "model.salesforce_source.stg_salesforce__opportunity"}, "test.salesforce_source.unique_stg_salesforce__opportunity_opportunity_id.367b0f577a": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "opportunity_id", "model": "{{ get_where_subquery(ref('stg_salesforce__opportunity')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "unique_stg_salesforce__opportunity_opportunity_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__opportunity_opportunity_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__opportunity_opportunity_id.367b0f577a", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__opportunity_opportunity_id"], "alias": "unique_stg_salesforce__opportunity_opportunity_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.8454359, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__opportunity", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__opportunity"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__opportunity_opportunity_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n opportunity_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__opportunity\"\nwhere opportunity_id is not null\ngroup by opportunity_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "opportunity_id", "file_key_name": "models.stg_salesforce__opportunity", "attached_node": "model.salesforce_source.stg_salesforce__opportunity"}, "test.salesforce_source.not_null_stg_salesforce__user_user_id.ac0ab26d65": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('stg_salesforce__user')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "not_null_stg_salesforce__user_user_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__user_user_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__user_user_id.ac0ab26d65", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__user_user_id"], "alias": "not_null_stg_salesforce__user_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.847147, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__user", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__user"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__user_user_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect user_id\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__user\"\nwhere user_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "user_id", "file_key_name": "models.stg_salesforce__user", "attached_node": "model.salesforce_source.stg_salesforce__user"}, "test.salesforce_source.unique_stg_salesforce__user_user_id.9a29b41152": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('stg_salesforce__user')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "unique_stg_salesforce__user_user_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__user_user_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__user_user_id.9a29b41152", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__user_user_id"], "alias": "unique_stg_salesforce__user_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.848299, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__user", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__user"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__user_user_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n user_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__user\"\nwhere user_id is not null\ngroup by user_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "user_id", "file_key_name": "models.stg_salesforce__user", "attached_node": "model.salesforce_source.stg_salesforce__user"}, "test.salesforce_source.not_null_stg_salesforce__user_role_user_role_id.949036e9bd": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_role_id", "model": "{{ get_where_subquery(ref('stg_salesforce__user_role')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "not_null_stg_salesforce__user_role_user_role_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__user_role_user_role_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__user_role_user_role_id.949036e9bd", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__user_role_user_role_id"], "alias": "not_null_stg_salesforce__user_role_user_role_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.849217, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__user_role", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__user_role"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__user_role_user_role_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect user_role_id\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__user_role\"\nwhere user_role_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "user_role_id", "file_key_name": "models.stg_salesforce__user_role", "attached_node": "model.salesforce_source.stg_salesforce__user_role"}, "test.salesforce_source.unique_stg_salesforce__user_role_user_role_id.1259050718": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "user_role_id", "model": "{{ get_where_subquery(ref('stg_salesforce__user_role')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "unique_stg_salesforce__user_role_user_role_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__user_role_user_role_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__user_role_user_role_id.1259050718", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__user_role_user_role_id"], "alias": "unique_stg_salesforce__user_role_user_role_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.85024, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__user_role", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__user_role"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__user_role_user_role_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n user_role_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__user_role\"\nwhere user_role_id is not null\ngroup by user_role_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "user_role_id", "file_key_name": "models.stg_salesforce__user_role", "attached_node": "model.salesforce_source.stg_salesforce__user_role"}, "test.salesforce_source.not_null_stg_salesforce__contact_contact_id.d7c02bef78": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "contact_id", "model": "{{ get_where_subquery(ref('stg_salesforce__contact')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "not_null_stg_salesforce__contact_contact_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__contact_contact_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__contact_contact_id.d7c02bef78", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__contact_contact_id"], "alias": "not_null_stg_salesforce__contact_contact_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.8511229, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__contact", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__contact"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__contact_contact_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect contact_id\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__contact\"\nwhere contact_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "contact_id", "file_key_name": "models.stg_salesforce__contact", "attached_node": "model.salesforce_source.stg_salesforce__contact"}, "test.salesforce_source.unique_stg_salesforce__contact_contact_id.0cc2c0609e": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "contact_id", "model": "{{ get_where_subquery(ref('stg_salesforce__contact')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "unique_stg_salesforce__contact_contact_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__contact_contact_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__contact_contact_id.0cc2c0609e", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__contact_contact_id"], "alias": "unique_stg_salesforce__contact_contact_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.851985, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__contact", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__contact"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__contact_contact_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n contact_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__contact\"\nwhere contact_id is not null\ngroup by contact_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "contact_id", "file_key_name": "models.stg_salesforce__contact", "attached_node": "model.salesforce_source.stg_salesforce__contact"}, "test.salesforce_source.not_null_stg_salesforce__event_event_id.e964b30db8": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_salesforce__event')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "not_null_stg_salesforce__event_event_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__event_event_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__event_event_id.e964b30db8", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__event_event_id"], "alias": "not_null_stg_salesforce__event_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.85299, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__event", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__event"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__event_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__event\"\nwhere event_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_salesforce__event", "attached_node": "model.salesforce_source.stg_salesforce__event"}, "test.salesforce_source.unique_stg_salesforce__event_event_id.13f7c8c0d9": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_salesforce__event')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "unique_stg_salesforce__event_event_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__event_event_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__event_event_id.13f7c8c0d9", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__event_event_id"], "alias": "unique_stg_salesforce__event_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.8538291, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__event", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__event"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__event_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n event_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__event\"\nwhere event_id is not null\ngroup by event_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "event_id", "file_key_name": "models.stg_salesforce__event", "attached_node": "model.salesforce_source.stg_salesforce__event"}, "test.salesforce_source.not_null_stg_salesforce__lead_lead_id.e2ba6b2026": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "lead_id", "model": "{{ get_where_subquery(ref('stg_salesforce__lead')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "not_null_stg_salesforce__lead_lead_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__lead_lead_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__lead_lead_id.e2ba6b2026", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__lead_lead_id"], "alias": "not_null_stg_salesforce__lead_lead_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.854662, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__lead", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__lead"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__lead_lead_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect lead_id\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__lead\"\nwhere lead_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "lead_id", "file_key_name": "models.stg_salesforce__lead", "attached_node": "model.salesforce_source.stg_salesforce__lead"}, "test.salesforce_source.unique_stg_salesforce__lead_lead_id.ba8b21e282": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "lead_id", "model": "{{ get_where_subquery(ref('stg_salesforce__lead')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "unique_stg_salesforce__lead_lead_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__lead_lead_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__lead_lead_id.ba8b21e282", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__lead_lead_id"], "alias": "unique_stg_salesforce__lead_lead_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.855485, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__lead", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__lead"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__lead_lead_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n lead_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__lead\"\nwhere lead_id is not null\ngroup by lead_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "lead_id", "file_key_name": "models.stg_salesforce__lead", "attached_node": "model.salesforce_source.stg_salesforce__lead"}, "test.salesforce_source.not_null_stg_salesforce__opportunity_line_item_opportunity_line_item_id.b5d2465072": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "opportunity_line_item_id", "model": "{{ get_where_subquery(ref('stg_salesforce__opportunity_line_item')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "not_null_stg_salesforce__opportunity_line_item_opportunity_line_item_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__oppor_cdeb75ef90723b483025a6ea3200473b.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__opportunity_line_item_opportunity_line_item_id.b5d2465072", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__opportunity_line_item_opportunity_line_item_id"], "alias": "not_null_stg_salesforce__oppor_cdeb75ef90723b483025a6ea3200473b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_salesforce__oppor_cdeb75ef90723b483025a6ea3200473b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"alias": "not_null_stg_salesforce__oppor_cdeb75ef90723b483025a6ea3200473b"}, "created_at": 1698690621.856529, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_salesforce__oppor_cdeb75ef90723b483025a6ea3200473b\") }}", "language": "sql", "refs": [{"name": "stg_salesforce__opportunity_line_item", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__opportunity_line_item"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__oppor_cdeb75ef90723b483025a6ea3200473b.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect opportunity_line_item_id\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__opportunity_line_item\"\nwhere opportunity_line_item_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "opportunity_line_item_id", "file_key_name": "models.stg_salesforce__opportunity_line_item", "attached_node": "model.salesforce_source.stg_salesforce__opportunity_line_item"}, "test.salesforce_source.unique_stg_salesforce__opportunity_line_item_opportunity_line_item_id.c18042d902": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "opportunity_line_item_id", "model": "{{ get_where_subquery(ref('stg_salesforce__opportunity_line_item')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "unique_stg_salesforce__opportunity_line_item_opportunity_line_item_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__opportu_e7519b9845106f63a1bb91c4defd69e4.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__opportunity_line_item_opportunity_line_item_id.c18042d902", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__opportunity_line_item_opportunity_line_item_id"], "alias": "unique_stg_salesforce__opportu_e7519b9845106f63a1bb91c4defd69e4", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "unique_stg_salesforce__opportu_e7519b9845106f63a1bb91c4defd69e4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {"alias": "unique_stg_salesforce__opportu_e7519b9845106f63a1bb91c4defd69e4"}, "created_at": 1698690621.857377, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(alias=\"unique_stg_salesforce__opportu_e7519b9845106f63a1bb91c4defd69e4\") }}", "language": "sql", "refs": [{"name": "stg_salesforce__opportunity_line_item", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__opportunity_line_item"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__opportu_e7519b9845106f63a1bb91c4defd69e4.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n opportunity_line_item_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__opportunity_line_item\"\nwhere opportunity_line_item_id is not null\ngroup by opportunity_line_item_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "opportunity_line_item_id", "file_key_name": "models.stg_salesforce__opportunity_line_item", "attached_node": "model.salesforce_source.stg_salesforce__opportunity_line_item"}, "test.salesforce_source.not_null_stg_salesforce__order_order_id.4782f3b34f": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "order_id", "model": "{{ get_where_subquery(ref('stg_salesforce__order')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "not_null_stg_salesforce__order_order_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__order_order_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__order_order_id.4782f3b34f", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__order_order_id"], "alias": "not_null_stg_salesforce__order_order_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.858217, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__order", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__order"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__order_order_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect order_id\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__order\"\nwhere order_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "order_id", "file_key_name": "models.stg_salesforce__order", "attached_node": "model.salesforce_source.stg_salesforce__order"}, "test.salesforce_source.unique_stg_salesforce__order_order_id.12a96b4e3c": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "order_id", "model": "{{ get_where_subquery(ref('stg_salesforce__order')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "unique_stg_salesforce__order_order_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__order_order_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__order_order_id.12a96b4e3c", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__order_order_id"], "alias": "unique_stg_salesforce__order_order_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.8591812, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__order", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__order"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__order_order_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n order_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__order\"\nwhere order_id is not null\ngroup by order_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "order_id", "file_key_name": "models.stg_salesforce__order", "attached_node": "model.salesforce_source.stg_salesforce__order"}, "test.salesforce_source.not_null_stg_salesforce__product_2_product_2_id.84aed29e8a": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "product_2_id", "model": "{{ get_where_subquery(ref('stg_salesforce__product_2')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "not_null_stg_salesforce__product_2_product_2_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__product_2_product_2_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__product_2_product_2_id.84aed29e8a", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__product_2_product_2_id"], "alias": "not_null_stg_salesforce__product_2_product_2_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.860012, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__product_2", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__product_2"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__product_2_product_2_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect product_2_id\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__product_2\"\nwhere product_2_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "product_2_id", "file_key_name": "models.stg_salesforce__product_2", "attached_node": "model.salesforce_source.stg_salesforce__product_2"}, "test.salesforce_source.unique_stg_salesforce__product_2_product_2_id.b4bc489d61": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "product_2_id", "model": "{{ get_where_subquery(ref('stg_salesforce__product_2')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "unique_stg_salesforce__product_2_product_2_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__product_2_product_2_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__product_2_product_2_id.b4bc489d61", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__product_2_product_2_id"], "alias": "unique_stg_salesforce__product_2_product_2_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.860826, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__product_2", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__product_2"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__product_2_product_2_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n product_2_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__product_2\"\nwhere product_2_id is not null\ngroup by product_2_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "product_2_id", "file_key_name": "models.stg_salesforce__product_2", "attached_node": "model.salesforce_source.stg_salesforce__product_2"}, "test.salesforce_source.not_null_stg_salesforce__task_task_id.aabe11a5d9": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "task_id", "model": "{{ get_where_subquery(ref('stg_salesforce__task')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "not_null_stg_salesforce__task_task_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__task_task_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__task_task_id.aabe11a5d9", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__task_task_id"], "alias": "not_null_stg_salesforce__task_task_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.8616478, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__task", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__task"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__task_task_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect task_id\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__task\"\nwhere task_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "task_id", "file_key_name": "models.stg_salesforce__task", "attached_node": "model.salesforce_source.stg_salesforce__task"}, "test.salesforce_source.unique_stg_salesforce__task_task_id.73684ed605": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "task_id", "model": "{{ get_where_subquery(ref('stg_salesforce__task')) }}"}, "namespace": null}, "database": "postgres", "schema": "salesforce_source_integrations_tests_3_dbt_test__audit", "name": "unique_stg_salesforce__task_task_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__task_task_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__task_task_id.73684ed605", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__task_task_id"], "alias": "unique_stg_salesforce__task_task_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1698690621.862601, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__task", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__task"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__task_task_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n task_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"salesforce_source_integrations_tests_3\".\"stg_salesforce__task\"\nwhere task_id is not null\ngroup by task_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "task_id", "file_key_name": "models.stg_salesforce__task", "attached_node": "model.salesforce_source.stg_salesforce__task"}}, "sources": {"source.salesforce_source.salesforce_history.account": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "account", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce_history/src_salesforce_history.yml", "original_file_path": "models/salesforce_history/src_salesforce_history.yml", "unique_id": "source.salesforce_source.salesforce_history.account", "fqn": ["salesforce_source", "salesforce_history", "salesforce_history", "account"], "source_name": "salesforce_history", "source_description": "", "loader": "fivetran", "identifier": "sf_account_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 24, "period": "hour"}, "error_after": {"count": 48, "period": "hour"}, "filter": null}, "external": null, "description": "Represents historical records of individual accounts, which are organizations or people involved with your business (such as customers, competitors, and partners).", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "true if it is the currently active record. false if it is a historical version of the record. Only one version of the record can be true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_start": {"name": "_fivetran_start", "description": "The time when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The time until which the record was active minus epsilon, where epsilon is the smallest time difference that can be stored in the timestamp type value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_number": {"name": "account_number", "description": "Account number assigned to this account (not the unique, system-generated ID assigned during creation).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_source": {"name": "account_source", "description": "The source of the account record. For example, Advertisement, Data.com, or Trade Show.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "annual_revenue": {"name": "annual_revenue", "description": "Estimated annual revenue of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_city": {"name": "billing_city", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_country": {"name": "billing_country", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_postal_code": {"name": "billing_postal_code", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_state": {"name": "billing_state", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_street": {"name": "billing_street", "description": "Street address for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Text description of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "industry": {"name": "industry", "description": "An industry associated with this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is one of the following, whichever is the most recent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "master_record_id": {"name": "master_record_id", "description": "If this object was deleted as the result of a merge, this field contains the ID of the record that was kept. If this object was deleted for any other reason, or has not been deleted, the value is null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Required. Name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "number_of_employees": {"name": "number_of_employees", "description": "Number of employees working at the company represented by this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "The ID of the user who currently owns this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "ownership": {"name": "ownership", "description": "Ownership type for the account, for example Private, Public, or Subsidiary.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "ID of the parent object, if any.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "rating": {"name": "rating", "description": "The account\u2019s prospect rating, for example Hot, Warm, or Cold.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_city": {"name": "shipping_city", "description": "Details of the shipping address for this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_country": {"name": "shipping_country", "description": "Details of the shipping address for this account. Country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_postal_code": {"name": "shipping_postal_code", "description": "Details of the shipping address for this account. Postal code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_state": {"name": "shipping_state", "description": "Details of the shipping address for this account. State.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_street": {"name": "shipping_street", "description": "The street address of the shipping address for this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of account, for example, Customer, Competitor, or Partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "website": {"name": "website", "description": "The website of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_account_history_data\"", "created_at": 1698690621.885459}, "source.salesforce_source.salesforce_history.contact": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "contact", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce_history/src_salesforce_history.yml", "original_file_path": "models/salesforce_history/src_salesforce_history.yml", "unique_id": "source.salesforce_source.salesforce_history.contact", "fqn": ["salesforce_source", "salesforce_history", "salesforce_history", "contact"], "source_name": "salesforce_history", "source_description": "", "loader": "fivetran", "identifier": "sf_contact_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 24, "period": "hour"}, "error_after": {"count": 48, "period": "hour"}, "filter": null}, "external": null, "description": "Represents the historical record of contacts, which are people associated with an account.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "true if it is the currently active record. false if it is a historical version of the record. Only one version of the record can be true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_start": {"name": "_fivetran_start", "description": "The time when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The time until which the record was active minus epsilon, where epsilon is the smallest time difference that can be stored in the timestamp type value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "ID of the account that\u2019s the parent of this contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "A description of the contact. Label is Contact Description up to 32 KB.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "The contact\u2019s email address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The contact\u2019s first name up to 40 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "home_phone": {"name": "home_phone", "description": "The contact\u2019s home telephone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "individual_id": {"name": "individual_id", "description": "ID of the data privacy record associated with this contact. This field is available if Data Protection and Privacy is enabled. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is the most recent of either: Due date of the most recent event logged against the record. Due date of the most recently closed task associated with the record.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "Required. Last name of the contact up to 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_source": {"name": "lead_source", "description": "The lead\u2019s source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_city": {"name": "mailing_city", "description": "City mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_country": {"name": "mailing_country", "description": "Country mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_postal_code": {"name": "mailing_postal_code", "description": "Postal code mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_state": {"name": "mailing_state", "description": "State mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_street": {"name": "mailing_street", "description": "Street mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "master_record_id": {"name": "master_record_id", "description": "If this record was deleted as the result of a merge, this field contains the ID of the record that remains. If this record was deleted for any other reason, or has not been deleted, the value is null. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mobile_phone": {"name": "mobile_phone", "description": "Contact\u2019s mobile phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Concatenation of FirstName, MiddleName, LastName, and Suffix up to 203 characters, including whitespaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner of the account associated with this contact. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "phone": {"name": "phone", "description": "Telephone number for the contact. Label is Business Phone.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reports_to_id": {"name": "reports_to_id", "description": "This field doesn\u2019t appear if IsPersonAccount is true. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "title": {"name": "title", "description": "Title", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_contact_history_data\"", "created_at": 1698690621.88564}, "source.salesforce_source.salesforce_history.opportunity": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "opportunity", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce_history/src_salesforce_history.yml", "original_file_path": "models/salesforce_history/src_salesforce_history.yml", "unique_id": "source.salesforce_source.salesforce_history.opportunity", "fqn": ["salesforce_source", "salesforce_history", "salesforce_history", "opportunity"], "source_name": "salesforce_history", "source_description": "", "loader": "fivetran", "identifier": "sf_opportunity_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 24, "period": "hour"}, "error_after": {"count": 48, "period": "hour"}, "filter": null}, "external": null, "description": "Represents historical records of opportunities, which are sales or pending deals.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "true if it is the currently active record. false if it is a historical version of the record. Only one version of the record can be true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_start": {"name": "_fivetran_start", "description": "The time when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The time until which the record was active minus epsilon, where epsilon is the smallest time difference that can be stored in the timestamp type value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "ID of the account associated with this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "amount": {"name": "amount", "description": "Estimated total sale amount. For opportunities with products, the amount is the sum of the related products.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "ID of a related Campaign. This field is defined only for those organizations that have the campaign feature Campaigns enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "close_date": {"name": "close_date", "description": "Required. Date when the opportunity is expected to close.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Date when the opportunity is was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Text description of the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "expected_revenue": {"name": "expected_revenue", "description": "Read-only field that is equal to the product of the opportunity Amount field and the Probability.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal": {"name": "fiscal", "description": "If fiscal years are not enabled, the name of the fiscal quarter or period in which the opportunity CloseDate falls.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal_quarter": {"name": "fiscal_quarter", "description": "Represents the fiscal quarter. Valid values are 1, 2, 3, or 4.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal_year": {"name": "fiscal_year", "description": "Represents the fiscal year, for example, 2006.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_category": {"name": "forecast_category", "description": "Restricted picklist field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_category_name": {"name": "forecast_category_name", "description": "The name of the forecast category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_open_activity": {"name": "has_open_activity", "description": "Indicates whether an opportunity has an open event or task (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_opportunity_line_item": {"name": "has_opportunity_line_item", "description": "Read-only field that indicates whether the opportunity has associated line items. A value of true means that Opportunity line items have been created for the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_overdue_task": {"name": "has_overdue_task", "description": "Indicates whether an opportunity has an overdue task (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_closed": {"name": "is_closed", "description": "True, if Stage Name Label is Closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_won": {"name": "is_won", "description": "True, if Stage Name Label is Won.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is one of the following, whichever is the most recent:Due date of the most recent event logged against the record or Due date of the most recently closed task associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_source": {"name": "lead_source", "description": "Source of this opportunity, such as Advertisement or Trade Show.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Required. A name for this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "next_step": {"name": "next_step", "description": "Description of next task in closing opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "ID of the User who has been assigned to work this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "probability": {"name": "probability", "description": "Percentage of estimated confidence in closing the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "stage_name": {"name": "stage_name", "description": "Required. Current stage of this record. The StageName field controls several other fields on an opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "synced_quote_id": {"name": "synced_quote_id", "description": "The ID of the Quote that syncs with the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of opportunity. For example, Existing Business or New Business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {"enabled": true}, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_opportunity_history_data\"", "created_at": 1698690621.885786}, "source.salesforce_source.salesforce.account": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "account", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.account", "fqn": ["salesforce_source", "salesforce", "salesforce", "account"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_account_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 24, "period": "hour"}, "error_after": {"count": 48, "period": "hour"}, "filter": null}, "external": null, "description": "Represents an individual account, which is an organization or person involved with your business (such as customers, competitors, and partners).", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_number": {"name": "account_number", "description": "Account number assigned to this account (not the unique, system-generated ID assigned during creation).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_source": {"name": "account_source", "description": "The source of the account record. For example, Advertisement, Data.com, or Trade Show.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "annual_revenue": {"name": "annual_revenue", "description": "Estimated annual revenue of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_city": {"name": "billing_city", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_country": {"name": "billing_country", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_country_code": {"name": "billing_country_code", "description": "The ISO country code for the account\u2019s billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_geocode_accuracy": {"name": "billing_geocode_accuracy", "description": "Accuracy level of the geocode for the billing address. See Compound Field Considerations and Limitations for details on geolocation compound fields.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_latitude": {"name": "billing_latitude", "description": "Used with BillingLongitude to specify the precise geolocation of a billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_longitude": {"name": "billing_longitude", "description": "Used with BillingLatitude to specify the precise geolocation of a billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_postal_code": {"name": "billing_postal_code", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_state": {"name": "billing_state", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_state_code": {"name": "billing_state_code", "description": "The ISO state code for the account\u2019s billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_street": {"name": "billing_street", "description": "Street address for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Text description of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fax": {"name": "fax", "description": "Fax number for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "industry": {"name": "industry", "description": "An industry associated with this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "jigsaw_company_id": {"name": "jigsaw_company_id", "description": "References the ID of a company in Data.com. If an account has a value in this field, it means that the account was imported from Data.com.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is one of the following, whichever is the most recent", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "master_record_id": {"name": "master_record_id", "description": "If this object was deleted as the result of a merge, this field contains the ID of the record that was kept. If this object was deleted for any other reason, or has not been deleted, the value is null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Required. Name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "number_of_employees": {"name": "number_of_employees", "description": "Number of employees working at the company represented by this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "The ID of the user who currently owns this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "ownership": {"name": "ownership", "description": "Ownership type for the account, for example Private, Public, or Subsidiary.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "ID of the parent object, if any.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "phone": {"name": "phone", "description": "Phone number for this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "photo_url": {"name": "photo_url", "description": "Path to be combined with the URL of a Salesforce instance (for example, https://yourInstance.salesforce.com/) to generate a URL to request the social network profile image associated with the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "rating": {"name": "rating", "description": "The account\u2019s prospect rating, for example Hot, Warm, or Cold.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_city": {"name": "shipping_city", "description": "Details of the shipping address for this account", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_country": {"name": "shipping_country", "description": "Details of the shipping address for this account. Country", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_country_code": {"name": "shipping_country_code", "description": "The ISO country code for the account\u2019s shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_geocode_accuracy": {"name": "shipping_geocode_accuracy", "description": "Accuracy level of the geocode for the shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_latitude": {"name": "shipping_latitude", "description": "Used with ShippingLongitude to specify the precise geolocation of a shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_longitude": {"name": "shipping_longitude", "description": "Used with ShippingLatitude to specify the precise geolocation of an address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_postal_code": {"name": "shipping_postal_code", "description": "Details of the shipping address for this account. Postal code", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_state": {"name": "shipping_state", "description": "Details of the shipping address for this account. State", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_state_code": {"name": "shipping_state_code", "description": "The ISO state code for the account\u2019s shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_street": {"name": "shipping_street", "description": "The street address of the shipping address for this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sic": {"name": "sic", "description": "Standard Industrial Classification code of the company\u2019s main business categorization, for example, 57340 for Electronics.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sic_desc": {"name": "sic_desc", "description": "A brief description of an organization\u2019s line of business, based on its SIC code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "site": {"name": "site", "description": "Name of the account\u2019s location, for example Headquarters or London.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "ticker_symbol": {"name": "ticker_symbol", "description": "The stock market symbol for this account. This field is available on business accounts, not person accounts.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of account, for example, Customer, Competitor, or Partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "website": {"name": "website", "description": "The website of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_account_data\"", "created_at": 1698690621.885936}, "source.salesforce_source.salesforce.opportunity": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "opportunity", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.opportunity", "fqn": ["salesforce_source", "salesforce", "salesforce", "opportunity"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_opportunity_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 24, "period": "hour"}, "error_after": {"count": 48, "period": "hour"}, "filter": null}, "external": null, "description": "Represents an opportunity, which is a sale or pending deal.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "ID of the account associated with this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "amount": {"name": "amount", "description": "Estimated total sale amount. For opportunities with products, the amount is the sum of the related products.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "ID of a related Campaign. This field is defined only for those organizations that have the campaign feature Campaigns enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "close_date": {"name": "close_date", "description": "Required. Date when the opportunity is expected to close.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Date when the opportunity is was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Text description of the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "expected_revenue": {"name": "expected_revenue", "description": "Read-only field that is equal to the product of the opportunity Amount field and the Probability.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal": {"name": "fiscal", "description": "If fiscal years are not enabled, the name of the fiscal quarter or period in which the opportunity CloseDate falls.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal_quarter": {"name": "fiscal_quarter", "description": "Represents the fiscal quarter. Valid values are 1, 2, 3, or 4.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal_year": {"name": "fiscal_year", "description": "Represents the fiscal year, for example, 2006.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_category": {"name": "forecast_category", "description": "Restricted picklist field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_category_name": {"name": "forecast_category_name", "description": "The name of the forecast category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_open_activity": {"name": "has_open_activity", "description": "Indicates whether an opportunity has an open event or task (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_opportunity_line_item": {"name": "has_opportunity_line_item", "description": "Read-only field that indicates whether the opportunity has associated line items. A value of true means that Opportunity line items have been created for the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_overdue_task": {"name": "has_overdue_task", "description": "Indicates whether an opportunity has an overdue task (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_closed": {"name": "is_closed", "description": "True, if Stage Name Label is Closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_excluded_from_territory_2_filter": {"name": "is_excluded_from_territory_2_filter", "description": "Used for Filter-Based Opportunity Territory Assignment. Indicates whether the opportunity is excluded (True) or included (False) each time the APEX filter is executed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_won": {"name": "is_won", "description": "True, if Stage Name Label is Won.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is one of the following, whichever is the most recent:Due date of the most recent event logged against the record or Due date of the most recently closed task associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_source": {"name": "lead_source", "description": "Source of this opportunity, such as Advertisement or Trade Show.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Required. A name for this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "next_step": {"name": "next_step", "description": "Description of next task in closing opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "ID of the User who has been assigned to work this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "Pricebook2Id": {"name": "Pricebook2Id", "description": "ID of a related Pricebook2 object. The Pricebook2Id field indicates which Pricebook2 applies to this opportunity. The Pricebook2Id field is defined only for those organizations that have products enabled as a feature. You can specify values for only one field (Pricebook2Id or PricebookId)\u2014not both fields. For this reason, both fields are declared nillable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "pricebook_2_id": {"name": "pricebook_2_id", "description": "Unavailable as of version 3.0. As of version 8.0, the Pricebook object is no longer available. Use the Pricebook2Id field instead, specifying the ID of the Pricebook2 record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "probability": {"name": "probability", "description": "Percentage of estimated confidence in closing the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "stage_name": {"name": "stage_name", "description": "Required. Current stage of this record. The StageName field controls several other fields on an opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "synced_quote_id": {"name": "synced_quote_id", "description": "The ID of the Quote that syncs with the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "territory_2_id": {"name": "territory_2_id", "description": "The ID of the territory that is assigned to the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of opportunity. For example, Existing Business or New Business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_opportunity_data\"", "created_at": 1698690621.8861241}, "source.salesforce_source.salesforce.user": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "user", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.user", "fqn": ["salesforce_source", "salesforce", "salesforce", "user"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_user_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Represents a user in your organization.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "True, if this field has been deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "about_me": {"name": "about_me", "description": "Information about the user, such as areas of interest or skills.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "ID of the Account associated with a Customer Portal user. This field is null for Salesforce users.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "alias": {"name": "alias", "description": "Required. The user\u2019s alias. For example, jsmith.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "badge_text": {"name": "badge_text", "description": "The community role, displayed on the user profile page just below the user name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "banner_photo_url": {"name": "banner_photo_url", "description": "The URL for the user's banner photo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "call_center_id": {"name": "call_center_id", "description": "If Salesforce CRM Call Center is enabled, represents the call center to which this user is assigned.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "city": {"name": "city", "description": "The city associated with the user. Up to 40 characters allowed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "community_nickname": {"name": "community_nickname", "description": "Name used to identify this user in the Community application, which includes the ideas and answers features.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "company_name": {"name": "company_name", "description": "The name of the user\u2019s company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "contact_id": {"name": "contact_id", "description": "ID of the Contact associated with this account. The contact must have a value in the AccountId field or an error occurs.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "country": {"name": "country", "description": "The country associated with the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "country_code": {"name": "country_code", "description": "The ISO country code associated with the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "default_group_notification_frequency": {"name": "default_group_notification_frequency", "description": "The default frequency for sending the user's Chatter group email notifications when the user joins groups.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "delegated_approver_id": {"name": "delegated_approver_id", "description": "Id of the user who is a delegated approver for this user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "department": {"name": "department", "description": "The company department associated with the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "digest_frequency": {"name": "digest_frequency", "description": "The frequency at which the system sends the user\u2019s Chatter personal email digest.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "division": {"name": "division", "description": "The division associated with this user, similar to Department and unrelated to DefaultDivision.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "Required. The user\u2019s email address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email_encoding_key": {"name": "email_encoding_key", "description": "Required. The email encoding for the user, such as ISO-8859-1 or UTF-8.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email_preferences_auto_bcc": {"name": "email_preferences_auto_bcc", "description": "Determines whether the user receives copies of sent emails. This option applies only if compliance BCC emails are not enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "employee_number": {"name": "employee_number", "description": "The user\u2019s employee number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "extension": {"name": "extension", "description": "The user\u2019s phone extension number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fax": {"name": "fax", "description": "The user\u2019s fax number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "federation_identifier": {"name": "federation_identifier", "description": "Indicates the value that must be listed in the Subject element of a Security Assertion Markup Language (SAML) IDP certificate to authenticate the user for a client application using single sign-on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The user\u2019s first name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_enabled": {"name": "forecast_enabled", "description": "Indicates whether the user is enabled as a forecast manager (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "full_photo_url": {"name": "full_photo_url", "description": "The URL for the user's profile photo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "geocode_accuracy": {"name": "geocode_accuracy", "description": "The level of accuracy of a location\u2019s geographical coordinates compared with its physical address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "individual_id": {"name": "individual_id", "description": "ID of the data privacy record associated with this user. This field is available if Data Protection and Privacy is enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_active": {"name": "is_active", "description": "Indicates whether the user has access to log in (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_profile_photo_active": {"name": "is_profile_photo_active", "description": "Indicates whether a user has a profile photo (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "language_locale_key": {"name": "language_locale_key", "description": "Required. The user\u2019s language, such as \u201cFrench\u201d or \u201cChinese (Traditional).\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_login_date": {"name": "last_login_date", "description": "The date and time when the user last successfully logged in. This value is updated if 60 seconds have elapsed since the user\u2019s last login.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "Required. The user\u2019s last name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp for when the current user last viewed a record related to this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced (LastReferencedDate) and not viewed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Used with Longitude to specify the precise geolocation of an address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "locale_sid_key": {"name": "locale_sid_key", "description": "Required. This field is a restricted picklist field. The value of the field affects formatting and parsing of values, especially numeric values, in the user interface.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Used with Latitude to specify the precise geolocation of an address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "manager_id": {"name": "manager_id", "description": "The Id of the user who manages this user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "medium_banner_photo_url": {"name": "medium_banner_photo_url", "description": "The URL for the medium-sized user profile banner photo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mobile_phone": {"name": "mobile_phone", "description": "The user\u2019s mobile or cellular phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Concatenation of FirstName and LastName.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "offline_trial_expiration_date": {"name": "offline_trial_expiration_date", "description": "The date and time when the user\u2019s Connect Offline trial expires.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "phone": {"name": "phone", "description": "The user\u2019s phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "postal_code": {"name": "postal_code", "description": "The user\u2019s postal or ZIP code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "profile_id": {"name": "profile_id", "description": "Required. ID of the user\u2019s Profile. Use this value to cache metadata based on profile. In earlier releases, this was RoleId.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "receives_admin_info_emails": {"name": "receives_admin_info_emails", "description": "Indicates whether the user receives email for administrators from Salesforce (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "receives_info_emails": {"name": "receives_info_emails", "description": "Indicates whether the user receives informational email from Salesforce (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sender_email": {"name": "sender_email", "description": "The email address used as the From address when the user sends emails. This address is the same value shown in Setup on the My Email Settings page.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sender_name": {"name": "sender_name", "description": "The name used as the email sender when the user sends emails. This name is the same value shown in Setup on the My Email Settings page.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "signature": {"name": "signature", "description": "The signature text added to emails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "small_banner_photo_url": {"name": "small_banner_photo_url", "description": "The URL for the small user profile banner photo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "small_photo_url": {"name": "small_photo_url", "description": "The URL for a thumbnail of the user's profile photo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "state": {"name": "state", "description": "The state associated with the User.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "state_code": {"name": "state_code", "description": "The ISO state code associated with the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "street": {"name": "street", "description": "The street address associated with the User.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_zone_sid_key": {"name": "time_zone_sid_key", "description": "Required. This field is a restricted picklist field. A User time zone affects the offset used when displaying or entering times in the user interface.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "title": {"name": "title", "description": "The user\u2019s business title, such as \u201cVice President.\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "username": {"name": "username", "description": "Contains the name that a user enters to log in. The value for this field must be in the form of an email address, using all lowercase characters. It must also be unique across all organizations.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "user_role_id": {"name": "user_role_id", "description": "ID of the user\u2019s UserRole.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "user_type": {"name": "user_type", "description": "The category of user license.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_user_data\"", "created_at": 1698690621.8862872}, "source.salesforce_source.salesforce.user_role": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "user_role", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.user_role", "fqn": ["salesforce_source", "salesforce", "salesforce", "user_role"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_user_role_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Represents a user role in your organization.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "True, if this field has been deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "case_access_for_account_owner": {"name": "case_access_for_account_owner", "description": "The case access level for the account owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "contact_access_for_account_owner": {"name": "contact_access_for_account_owner", "description": "The contact access level for the account owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "developer_name": {"name": "developer_name", "description": "The unique name of the object in the API.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_user_id": {"name": "forecast_user_id", "description": "The ID of the forecast manager associated with this role.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "may_forecast_manager_share": {"name": "may_forecast_manager_share", "description": "Indicates whether the forecast manager can manually share their own forecast.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Required. Name of the role. Corresponds to Label on the user interface.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_access_for_account_owner": {"name": "opportunity_access_for_account_owner", "description": "Required. The opportunity access level for the account owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_role_id": {"name": "parent_role_id", "description": "The ID of the parent role.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "portal_type": {"name": "portal_type", "description": "This value indicates the type of portal for the role", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "rollup_description": {"name": "rollup_description", "description": "Description of the forecast rollup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_user_role_data\"", "created_at": 1698690621.886385}, "source.salesforce_source.salesforce.contact": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "contact", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.contact", "fqn": ["salesforce_source", "salesforce", "salesforce", "contact"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_contact_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Represents a contact, which is a person associated with an account.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "ID of the account that\u2019s the parent of this contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assistant_name": {"name": "assistant_name", "description": "The assistant\u2019s name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assistant_phone": {"name": "assistant_phone", "description": "The assistant\u2019s telephone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "birthdate": {"name": "birthdate", "description": "The contact\u2019s birthdate.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "department": {"name": "department", "description": "The contact\u2019s department.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "A description of the contact. Label is Contact Description up to 32 KB.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "do_not_call": {"name": "do_not_call", "description": "Indicates that the contact does not want to receive calls.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "The contact\u2019s email address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email_bounced_date": {"name": "email_bounced_date", "description": "If bounce management is activated and an email sent to the contact bounces, the date and time of the bounce.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email_bounced_reason": {"name": "email_bounced_reason", "description": "If bounce management is activated and an email sent to the contact bounces, the reason for the bounce.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fax": {"name": "fax", "description": "The contact\u2019s fax number. Label is Business Fax.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The contact\u2019s first name up to 40 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_opted_out_of_email": {"name": "has_opted_out_of_email", "description": "indicates whether the contact doesn\u2019t want to receive email from Salesforce (true) or does (false). Label is Email Opt Out", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_opted_out_of_fax": {"name": "has_opted_out_of_fax", "description": "Indicates whether the contact prohibits receiving faxes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "home_phone": {"name": "home_phone", "description": "The contact\u2019s home telephone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "individual_id": {"name": "individual_id", "description": "ID of the data privacy record associated with this contact. This field is available if Data Protection and Privacy is enabled. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_email_bounced": {"name": "is_email_bounced", "description": "If bounce management is activated and an email is sent to a contact, indicates whether the email bounced (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "jigsaw": {"name": "jigsaw", "description": "Data.com Key", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "jigsaw_contact_id": {"name": "jigsaw_contact_id", "description": "Jigsaw contact OD", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is the most recent of either: Due date of the most recent event logged against the record. Due date of the most recently closed task associated with the record.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_curequest_date": {"name": "last_curequest_date", "description": "Last Stay-in-Touch Request Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_cuupdate_date": {"name": "last_cuupdate_date", "description": "Last Stay-in-Touch Save Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "Required. Last name of the contact up to 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_source": {"name": "lead_source", "description": "The lead\u2019s source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_city": {"name": "mailing_city", "description": "Mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_country": {"name": "mailing_country", "description": "Mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_country_code": {"name": "mailing_country_code", "description": "The ISO codes for the mailing address\u2019s state and country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_geocode_accuracy": {"name": "mailing_geocode_accuracy", "description": "Accuracy level of the geocode for the mailing address. For details on geolocation compound field", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_latitude": {"name": "mailing_latitude", "description": "Used with MailingLongitude to specify the precise geolocation of a mailing address. Acceptable values are numbers between \u201390 and 90 up to 15 decimal places. For details on geolocation compound fields", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_longitude": {"name": "mailing_longitude", "description": "Used with MailingLatitude to specify the precise geolocation of a mailing address. Acceptable values are numbers between \u2013180 and 180 up to 15 decimal places. For details on geolocation compound fields", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_postal_code": {"name": "mailing_postal_code", "description": "Mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_state": {"name": "mailing_state", "description": "Mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_state_code": {"name": "mailing_state_code", "description": "The ISO codes for the mailing address\u2019s state and country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_street": {"name": "mailing_street", "description": "Street address for mailing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "master_record_id": {"name": "master_record_id", "description": "If this record was deleted as the result of a merge, this field contains the ID of the record that remains. If this record was deleted for any other reason, or has not been deleted, the value is null. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mobile_phone": {"name": "mobile_phone", "description": "Contact\u2019s mobile phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Concatenation of FirstName, MiddleName, LastName, and Suffix up to 203 characters, including whitespaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "other_city": {"name": "other_city", "description": "Alternate address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "other_country": {"name": "other_country", "description": "Alternate address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "other_geocode_accuracy": {"name": "other_geocode_accuracy", "description": "Accuracy level of the geocode for the other address. For details on geolocation compound fields", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "other_latitude": {"name": "other_latitude", "description": "Used with OtherLongitude to specify the precise geolocation of an alternate address. Acceptable values are numbers between \u201390 and 90 up to 15 decimal places. For details on geolocation compound fields", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "other_longitude": {"name": "other_longitude", "description": "Used with OtherLatitude to specify the precise geolocation of an alternate address. Acceptable values are numbers between \u2013180 and 180 up to 15 decimal places. For details on geolocation compound fields", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "other_phone": {"name": "other_phone", "description": "Telephone for alternate address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "other_postal_code": {"name": "other_postal_code", "description": "Alternate address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "other_state": {"name": "other_state", "description": "Alternate address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "other_street": {"name": "other_street", "description": "Street for alternate address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner of the account associated with this contact. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "phone": {"name": "phone", "description": "Telephone number for the contact. Label is Business Phone.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "photo_url": {"name": "photo_url", "description": "'Path to be combined with the URL of a Salesforce instance (Example: https://yourInstance.salesforce.com/) to generate a URL to request the social network profile image associated with the contact. Generated URL returns an HTTP redirect (code 302) to the social network profile image for the contact. Empty if Social Accounts and Contacts isn't enabled or if Social Accounts and Contacts is disabled for the requesting user.'\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reports_to_id": {"name": "reports_to_id", "description": "This field doesn\u2019t appear if IsPersonAccount is true. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "salutation": {"name": "salutation", "description": "Honorific abbreviation, word, or phrase to be used in front of name in greetings, such as Dr. or Mrs.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "system_modstamp": {"name": "system_modstamp", "description": "System Modstamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "title": {"name": "title", "description": "Title", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_contact_data\"", "created_at": 1698690621.886724}, "source.salesforce_source.salesforce.event": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "event", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.event", "fqn": ["salesforce_source", "salesforce", "salesforce", "event"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_event_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Represents an event in the calendar. In the user interface, event and task records are collectively referred to as activities.", "columns": {"id": {"name": "id", "description": "Activity ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "Represents the ID of the related account. The AccountId is determined as follows. If the value of WhatId is any of the following objects, then Salesforce uses that object\u2019s AccountId.\nAccount Opportunity Contract Custom object that is a child of Account If the value of the WhatId field is any other object, and the value of the WhoId field is a contact object, then Salesforce uses that contact\u2019s AccountId. (If your org uses Shared Activities, Salesforce uses the AccountId of the primary contact.)\nOtherwise, Salesforce sets the value of the AccountId field to null.\nFor information on IDs, see ID Field Type.\nThis is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "activity_date": {"name": "activity_date", "description": "Contains the event\u2019s due date if the IsAllDayEvent flag is set to true. This field is a date field with a timestamp that is always set to midnight in the Coordinated Universal Time (UTC) time zone. Don\u2019t attempt to alter the timestamp to account for time zone differences. Label is Due Date Only. This field is required in versions 12.0 and earlier if the IsAllDayEvent flag is set to true.\nThe value for this field and StartDateTime must match, or one of them must be null.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "activity_date_time": {"name": "activity_date_time", "description": "Contains the event\u2019s due date if the IsAllDayEvent flag is set to false. The time portion of this field is always transferred in the Coordinated Universal Time (UTC) time zone. Translate the time portion to or from a local time zone for the user or the application, as appropriate. Label is Due Date Time. This field is required in versions 12.0 and earlier if the IsAllDayEvent flag is set to false.\nThe value for this field and StartDateTime must match, or one of them must be null.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Contains a text description of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "duration_in_minutes": {"name": "duration_in_minutes", "description": "Contains the event length, in minutes\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "end_date": {"name": "end_date", "description": "Read-only. Available in versions 46.0 and later. This field supplies the date value that appears in the EndDateTime field. This field is a date field with a timestamp that is always set to midnight in the Coordinated Universal Time (UTC) time zone.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "end_date_time": {"name": "end_date_time", "description": "Available in versions 13.0 and later. The time portion of this field is always transferred in the Coordinated Universal Time (UTC) time zone. Translate the time portion to or from a local time zone for the user or the application, as appropriate.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "event_subtype": {"name": "event_subtype", "description": "Provides standard subtypes to facilitate creating and searching for events. This field isn\u2019t updateable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "group_event_type": {"name": "group_event_type", "description": "Group Event Type", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_archived": {"name": "is_archived", "description": "Indicates whether the event has been archived.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_child": {"name": "is_child", "description": "Indicates whether the event is a child of another event (true) or not (false). For a child event, you can update IsReminderSet and ReminderDateTime only. You can query and delete a child event. If the objects related to the child event are different from those objects related to the parent event (this difference is possible if you use API version 25.0 or earlier) and one of the objects related to the child event is deleted, the objects related to the parent event are updated to ensure data integrity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_group_event": {"name": "is_group_event", "description": "Indicates whether the event is a group event\u2014that is, whether it has invitees (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_private": {"name": "is_private", "description": "Indicates whether users other than the creator of the event can (false) or can\u2019t (true) see the event details when viewing the event user\u2019s calendar. However, users with the View All Data or Modify All Data permission can see private events in reports and searches, or when viewing other users\u2019 calendars. Private events can\u2019t be associated with opportunities, accounts, cases, campaigns, contracts, leads, or contacts. Label is Private.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_recurrence": {"name": "is_recurrence", "description": "Indicates whether a Salesforce Classic event is scheduled to repeat itself (true) or only occurs one time (false). This field is read-only when updating records, but not when creating them. If this field value is true, then RecurrenceEndDateOnly, RecurrenceStartDateTime, RecurrenceType, and any recurrence fields associated with the given recurrence type must be populated. Label is Create recurring series of events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_recurrence_2": {"name": "is_recurrence_2", "description": "Read-only. This field available in API version 44.0 and later. Indicates whether a Lightning Experience event is scheduled to repeat (true) or only occurs one time (false). If this field value is true, then Recurrence2PatternText and Recurrence2PatternVersion must be populated. Label is Repeat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_recurrence_2_exception": {"name": "is_recurrence_2_exception", "description": "Read-only. This field available in API version 44.0 and later. Indicates whether an individual event in a Lightning Experience event series has a recurrence pattern that\u2019s different from the rest of the series, making it an exception.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_recurrence_2_exclusion": {"name": "is_recurrence_2_exclusion", "description": "Read-only. This field available in API version 44.0 and later. Indicates when updates to a Lightning Experience event series recurrence pattern have been made, but affect future event occurrences only. For past event occurrences, IsRecurrence2Exclusion is set to true, excluding past occurrences from the series recurrence pattern.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_reminder_set": {"name": "is_reminder_set", "description": "Indicates whether the activity is a reminder (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "location": {"name": "location", "description": "Contains the location of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "Contains the ID of the user or public calendar who owns the event. Label is Assigned to ID. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_2_pattern_start_date": {"name": "recurrence_2_pattern_start_date", "description": "Read-only. This field available in API version 44.0 and later. Indicates the date and time when the Lightning Experience event series begins. The time portion of this field is always transferred in the Coordinated Universal Time (UTC) time zone. Translate the time portion to or from a local time zone for the user or the application, as appropriate.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_2_pattern_text": {"name": "recurrence_2_pattern_text", "description": "The RRULE that describes the recurrence pattern for Lightning Experience event series. Supports a subset of the RFC 5545 standard for internet calendaring and scheduling. See the Event Series section in this topic for usage examples. This field has a maximum length of 512 characters. This field is available in API version 44.0 and later, and has the Create property in API version 52.0 and later.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_2_pattern_time_zone": {"name": "recurrence_2_pattern_time_zone", "description": "This field available in API version 44.0 and later. Indicates the time zone in which the Lightning Experience event series was created or updated. This field uses standard Java TimeZone IDs. For example, America/Los_Angeles.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_2_pattern_version": {"name": "recurrence_2_pattern_version", "description": "Read-only. This field available in API version 44.0 and later. Indicates the standard specifications for Lightning Experience event series recurrence patterns. The only possible value is 1 (RFC 5545 v4 RRULE)\u2014RFC 5545 is a standard set of specifications for internet calendaring and scheduling that IsRecurrence2 adheres to for series recurrence patterns. RFC 5545 specifications for series recurrence patterns are called RRULES. For examples of rrule usage, see the Event Series section in this topic.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_activity_id": {"name": "recurrence_activity_id", "description": "Read-only. Not required on create. Contains the ID of the main record of the Salesforce Classic recurring event. Subsequent occurrences have the same value in this field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_day_of_month": {"name": "recurrence_day_of_month", "description": "Indicates the day of the month on which the event repeats.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_day_of_week_mask": {"name": "recurrence_day_of_week_mask", "description": "Indicates the day or days of the week on which the Salesforce Classic recurring event repeats. This field contains a bitmask. The values are as follows: Sunday = 1 Monday = 2 Tuesday = 4 Wednesday = 8 Thursday = 16 Friday = 32 Saturday = 64 Multiple days are represented as the sum of their numerical values. For example, Tuesday and Thursday = 4 + 16 = 20.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_end_date_only": {"name": "recurrence_end_date_only", "description": "Indicates the last date on which the event repeats. For multiday Salesforce Classic recurring events, this date is the day on which the last occurrence starts. This field is a date field with a timestamp that is always set to midnight in the Coordinated Universal Time (UTC) time zone. Don\u2019t attempt to alter the timestamp to account for time zone differences.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_instance": {"name": "recurrence_instance", "description": "Indicates the frequency of the Salesforce Classic event\u2019s recurrence. For example, 2nd or 3rd.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_interval": {"name": "recurrence_interval", "description": "Indicates the interval between Salesforce Classic recurring events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_month_of_year": {"name": "recurrence_month_of_year", "description": "Indicates the month in which the Salesforce Classic recurring event repeats.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_start_date_time": {"name": "recurrence_start_date_time", "description": "Indicates the date and time when the Salesforce Classic recurring event begins. The value must precede the RecurrenceEndDateOnly. The time portion of this field is always transferred in the Coordinated Universal Time (UTC) time zone. Translate the time portion to or from a local time zone for the user or the application, as appropriate.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_time_zone_sid_key": {"name": "recurrence_time_zone_sid_key", "description": "Indicates the time zone associated with a Salesforce Classic recurring event. For example, \u201cUTC-8:00\u201d for Pacific Standard Time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_type": {"name": "recurrence_type", "description": "Indicates how often the Salesforce Classic event repeats. For example, daily, weekly, or every nth month (where \u201cnth\u201d is defined in RecurrenceInstance).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reminder_date_time": {"name": "reminder_date_time", "description": "Represents the time when the reminder is scheduled to fire, if IsReminderSet is set to true. If IsReminderSet is set to false, then the user may have deselected the reminder checkbox in the Salesforce user interface, or the reminder has already fired at the time indicated by the value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "show_as": {"name": "show_as", "description": "Indicates how this event appears when another user views the calendar: Busy, Out of Office, or Free. Label is Show Time As.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "start_date_time": {"name": "start_date_time", "description": "Indicates the start date and time of the event. Available in versions 13.0 and later.\nIf this field has a value, then ActivityDate and ActivityDateTime must either be null or match the value of this field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "subject": {"name": "subject", "description": "The subject line of the event, such as Call, Email, or Meeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "system_modstamp": {"name": "system_modstamp", "description": "System Modstamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "Indicates the event type, such as Call, Email, or Meeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "what_count": {"name": "what_count", "description": "Available if your organization has enabled Shared Activities. Represents the count of related EventRelations pertaining to the WhatId. The count of the WhatId must be 1 or less.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "what_id": {"name": "what_id", "description": "The WhatId represents nonhuman objects such as accounts, opportunities, campaigns, cases, or custom objects. WhatIds are polymorphic. Polymorphic means a WhatId is equivalent to the ID of a related object. The label is Related To ID. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "who_count": {"name": "who_count", "description": "Available to organizations that have Shared Activities enabled. Represents the count of related EventRelations pertaining to the WhoId.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "who_id": {"name": "who_id", "description": "The WhoId represents a human such as a lead or a contact. WhoIds are polymorphic. Polymorphic means a WhoId is equivalent to a contact\u2019s ID or a lead\u2019s ID. The label is Name ID.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_event_data\"", "created_at": 1698690621.887039}, "source.salesforce_source.salesforce.lead": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "lead", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.lead", "fqn": ["salesforce_source", "salesforce", "salesforce", "lead"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_lead_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Represents a prospect or lead.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "annual_revenue": {"name": "annual_revenue", "description": "Annual revenue for the lead\u2019s company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "city": {"name": "city", "description": "City for the lead\u2019s address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "company": {"name": "company", "description": "Required. The lead\u2019s company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "converted_account_id": {"name": "converted_account_id", "description": "Object reference ID that points to the account into which the lead converted. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "converted_contact_id": {"name": "converted_contact_id", "description": "Object reference ID that points to the contact into which the lead converted. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "converted_date": {"name": "converted_date", "description": "Date on which this lead was converted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "converted_opportunity_id": {"name": "converted_opportunity_id", "description": "Object reference ID that points to the opportunity into which the lead has been converted. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "country": {"name": "country", "description": "The lead\u2019s country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "country_code": {"name": "country_code", "description": "The ISO country code for the lead\u2019s address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "The lead\u2019s description.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "The lead\u2019s email address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email_bounced_date": {"name": "email_bounced_date", "description": "If bounce management is activated and an email sent to the lead bounced, the date and time of the bounce.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email_bounced_reason": {"name": "email_bounced_reason", "description": "If bounce management is activated and an email sent to the lead bounced, the reason for the bounce.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fax": {"name": "fax", "description": "The lead\u2019s fax number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The lead\u2019s first name up to 40 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "geocode_accuracy": {"name": "geocode_accuracy", "description": "Accuracy level of the geocode for the address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_opted_out_of_email": {"name": "has_opted_out_of_email", "description": "Indicates whether the lead doesn\u2019t want to receive email from Salesforce (true) or does (false). Label is Email Opt Out.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "individual_id": {"name": "individual_id", "description": "ID of the data privacy record associated with this lead. This field is available if you enabled Data Protection and Privacy in Setup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "industry": {"name": "industry", "description": "Industry in which the lead works.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_converted": {"name": "is_converted", "description": "Indicates whether the lead has been converted (true) or not (false). Label is Converted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_unread_by_owner": {"name": "is_unread_by_owner", "description": "If true, lead has been assigned, but not yet viewed. See Unread Leads for more information. Label is Unread By Owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "jigsaw_contact_id": {"name": "jigsaw_contact_id", "description": "Jigsaw Contact ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "'Value is the most recent of either: Due date of the most recent event logged against the record. Due date of the most recently closed task associated with the record.'\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "Required. Last name of the lead up to 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Used with Longitude to specify the precise geolocation of an address. Acceptable values are numbers between \u201390 and 90 up to 15 decimal places.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_source": {"name": "lead_source", "description": "The lead\u2019s source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Used with Latitude to specify the precise geolocation of an address. Acceptable values are numbers between \u2013180 and 180 up to 15 decimal places.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "master_record_id": {"name": "master_record_id", "description": "If this record was deleted as the result of a merge, this field contains the ID of the record that was kept. If this record was deleted for any other reason, or has not been deleted, the value is null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mobile_phone": {"name": "mobile_phone", "description": "The lead\u2019s mobile phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Concatenation of FirstName, MiddleName, LastName, and Suffix up to 203 characters, including whitespaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "number_of_employees": {"name": "number_of_employees", "description": "Number of employees at the lead\u2019s company. Label is Employees.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "ID of the lead\u2019s owner. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "phone": {"name": "phone", "description": "The lead\u2019s phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "photo_url": {"name": "photo_url", "description": "Path to be combined with the URL of a Salesforce instance", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "postal_code": {"name": "postal_code", "description": "Postal code for the address of the lead. Label is Zip/Postal Code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "salutation": {"name": "salutation", "description": "Salutation for the lead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "state": {"name": "state", "description": "State for the address of the lead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "state_code": {"name": "state_code", "description": "The ISO state code for the lead\u2019s address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"name": "status", "description": "Status code for this converted lead. Status codes are defined in Status and represented in the API by the LeadStatus object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "street": {"name": "street", "description": "Street number and name for the address of the lead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "system_modstamp": {"name": "system_modstamp", "description": "System Modstamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "title": {"name": "title", "description": "Title for the lead, such as CFO or CEO.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "website": {"name": "website", "description": "Website for the lead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_lead_data\"", "created_at": 1698690621.8873}, "source.salesforce_source.salesforce.opportunity_line_item": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "opportunity_line_item", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.opportunity_line_item", "fqn": ["salesforce_source", "salesforce", "salesforce", "opportunity_line_item"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_opportunity_line_item_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Represents an opportunity line item, which is a member of the list of Product2 products associated with an Opportunity.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Text description of the opportunity line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "discount": {"name": "discount", "description": "Discount for the product as a percentage. When updating these records: If you specify Discount without specifying TotalPrice, the TotalPrice is adjusted to accommodate the new Discount value, and the UnitPrice is held constant. If you specify both Discount and Quantity, you must also specify either TotalPrice or UnitPrice so the system knows which one to automatically adjust.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_quantity_schedule": {"name": "has_quantity_schedule", "description": "Read-only. Indicates whether a quantity schedule has been created for this object (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_revenue_schedule": {"name": "has_revenue_schedule", "description": "Indicates whether a revenue schedule has been created for this object (true) or not (false). If this object has a revenue schedule, the Quantity and TotalPrice fields can\u2019t be updated. In addition, the Quantity field can\u2019t be updated if this object has a quantity schedule. Update requests aren\u2019t rejected but the updated values are ignored.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_schedule": {"name": "has_schedule", "description": "If either HasQuantitySchedule or HasRevenueSchedule is true, this field is also true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp for when the current user last viewed a record related to this record. Available in API version 50.0 and later.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced (LastReferencedDate) and not viewed. Available in API version 50.0 and later.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "list_price": {"name": "list_price", "description": "Corresponds to the UnitPrice on the PricebookEntry that is associated with this line item, which can be in the standard price book or a custom price book. A client application can use this information to show whether the unit price (or sales price) of the line item differs from the price book entry list price.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "The opportunity line item name (known as \u201cOpportunity Product\u201d in the user interface). This read-only field is available in API version 30.0 and later.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_id": {"name": "opportunity_id", "description": "Required. ID of the associated Opportunity. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "pricebook_entry_id": {"name": "pricebook_entry_id", "description": "Required. ID of the associated PricebookEntry. Exists only for those organizations that have Products enabled as a feature. In API versions 1.0 and 2.0, you can specify values for either this field or ProductId, but not both. For this reason, both fields are declared nillable. In API version 3.0 and later, you must specify values for this field instead of ProductId. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "product_2_id": {"name": "product_2_id", "description": "The ID of the related Product2 record. This is a read-only field available in API version 30.0 and later. Use the PricebookEntryId field instead, specifying the ID of the PricebookEntry record.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "product_code": {"name": "product_code", "description": "This read-only field is available in API version 30.0 and later. It references the value in the ProductCode field of the related Product2 record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "Read-only if this record has a quantity schedule, a revenue schedule, or both a quantity and a revenue schedule. When updating these records: If you specify Quantity without specifying the UnitPrice, the UnitPrice value will be adjusted to accommodate the new Quantity value, and the TotalPrice will be held constant. If you specify both Discount and Quantity, you must also specify either TotalPrice or UnitPrice so the system can determine which one to automatically adjust.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "service_date": {"name": "service_date", "description": "Date when the product revenue will be recognized and the product quantity will be shipped. Opportunity Close Date\u2014ServiceDate is ignored. Product Date\u2014ServiceDate is used if not null. Schedule Date\u2014ServiceDate is used if not null and there are no revenue schedules present for this line item, that is, there are no OpportunityLineItemSchedule records with a field Type value of Revenue that are children of this record.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sort_order": {"name": "sort_order", "description": "Number indicating the sort order selected by the user. Client applications can use this to match the sort order in Salesforce.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "system_modstamp": {"name": "system_modstamp", "description": "System Modstamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "This field is available only for backward compatibility. It represents the total price of the OpportunityLineItem. If you do not specify UnitPrice, this field is required. If you specify Discount and Quantity, this field or UnitPrice is required. When updating these records, you can change either this value or the UnitPrice, but not both at the same time.\nThis field is nullable, but you can\u2019t set both TotalPrice and UnitPrice to null in the same update request. To insert the TotalPrice via the API (given only a unit price and the quantity), calculate this field as the unit price multiplied by the quantity. This field is read-only if the opportunity line item has a revenue schedule. If the opportunity line item does not have a schedule or only has quantity schedule, this field can be updated.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "unit_price": {"name": "unit_price", "description": "The unit price for the opportunity line item. In the Salesforce user interface, this field\u2019s value is calculated by dividing the total price of the opportunity line item by the quantity listed for that line item. Label is Sales Price. This field or TotalPrice is required. You can\u2019t specify both.\nIf you specify Discount and Quantity, this field or TotalPrice is required.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_opportunity_line_item_data\"", "created_at": 1698690621.887553}, "source.salesforce_source.salesforce.order": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "order", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.order", "fqn": ["salesforce_source", "salesforce", "salesforce", "order"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_order_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Represents an order associated with a contract or an account.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "Required. ID of the Account associated with this order. Can only be updated when the order\u2019s StatusCode value is Draft. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "activated_by_id": {"name": "activated_by_id", "description": "ID of the User who activated this order. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "activated_date": {"name": "activated_date", "description": "Date and time when the order was activated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_city": {"name": "billing_city", "description": "City for the billing address for this order. Maximum size is 40 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_country": {"name": "billing_country", "description": "Country for the billing address for this order. Maximum size is 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_country_code": {"name": "billing_country_code", "description": "ISO country code for the billing address for this order.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_geocode_accuracy": {"name": "billing_geocode_accuracy", "description": "Accuracy level of the geocode of the address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_latitude": {"name": "billing_latitude", "description": "Used with BillingLongitude to specify the precise geolocation of a billing address. Acceptable values are numbers between \u201390 and 90 with up to 15 decimal places.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_longitude": {"name": "billing_longitude", "description": "Used with BillingLatitude to specify the precise geolocation of a billing address. Acceptable values are numbers between \u2013180 and 180 with up to 15 decimal places.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_postal_code": {"name": "billing_postal_code", "description": "Postal code for the billing address for this order. Maximum size is 20 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_state": {"name": "billing_state", "description": "State for the billing address for this order. Maximum size is 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_state_code": {"name": "billing_state_code", "description": "ISO state code for the order\u2019s billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_street": {"name": "billing_street", "description": "Street address for the billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "company_authorized_by_id": {"name": "company_authorized_by_id", "description": "ID of the user who authorized the account associated with the order. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "contract_id": {"name": "contract_id", "description": "ID of the contract associated with this order. Can only be updated when the order\u2019s StatusCode value is Draft. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "customer_authorized_by_id": {"name": "customer_authorized_by_id", "description": "ID of the contact who authorized the order. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Description of the order.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "effective_date": {"name": "effective_date", "description": "Date at which the order becomes effective. Label is Order Start Date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "end_date": {"name": "end_date", "description": "Date at which the order ends. Label is Order End Date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_reduction_order": {"name": "is_reduction_order", "description": "Read-only. Determines whether an order is a reduction order. Label is Reduction Order.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_id": {"name": "opportunity_id", "description": "ID for the opportunity that\u2019s associated with this order.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "order_number": {"name": "order_number", "description": "Order number assigned to this order (not the unique, system-generated ID assigned during creation). Maximum size is 30 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "original_order_id": {"name": "original_order_id", "description": "Optional. ID of the original order that a reduction order is reducing, if the reduction order is reducing a single order. Label is Original Order. Editable only if isReductionOrder is true. If the reduction order is reducing more than one order, leave blank. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "Required. ID of the User or queue that owns this order. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "pricebook_2_id": {"name": "pricebook_2_id", "description": "Required. ID of the price book associated with this order. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_city": {"name": "shipping_city", "description": "City of the shipping address. Maximum size is 40 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_country": {"name": "shipping_country", "description": "Country of the shipping address. Maximum size is 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_country_code": {"name": "shipping_country_code", "description": "ISO country code for the order\u2019s shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_geocode_accuracy": {"name": "shipping_geocode_accuracy", "description": "Accuracy level of the geocode of the shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_latitude": {"name": "shipping_latitude", "description": "Used with ShippingLongitude to specify the precise geolocation of a shipping address. Acceptable values are numbers between \u201390 and 90 with up to 15 decimal places.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_longitude": {"name": "shipping_longitude", "description": "Used with ShippingLatitude to specify the precise geolocation of an address. Acceptable values are numbers between \u2013180 and 180 with up to 15 decimal places.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_postal_code": {"name": "shipping_postal_code", "description": "Postal code of the shipping address. Maximum size is 20 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_state": {"name": "shipping_state", "description": "State of the shipping address. Maximum size is 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_state_code": {"name": "shipping_state_code", "description": "ISO state code for the order\u2019s shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_street": {"name": "shipping_street", "description": "Street address of the shipping address. Maximum of 255 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"name": "status", "description": "Picklist of values that indicate order status. Each value is within one of two status categories defined in StatusCode. For example, the status picklist might contain Draft, Ready for Review, and Ready for Activation values with a StatusCode of Draft.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_code": {"name": "status_code", "description": "The status category for the order. An order can be either Draft or Activated. Label is Status Category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "system_modstamp": {"name": "system_modstamp", "description": "System Modstamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "total_amount": {"name": "total_amount", "description": "The total amount for the order products associated with this order. This field is available in API v48.0 and later.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "If you want to show more information about your order, you can add custom values to the Type picklist. By default, the Type field doesn't perform any actions or show any values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_order_data\"", "created_at": 1698690621.8878121}, "source.salesforce_source.salesforce.product_2": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "product_2", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.product_2", "fqn": ["salesforce_source", "salesforce", "salesforce", "product_2"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_product_2_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Represents a product that your company sells.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "A text description of this record. Label is Product Description.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "display_url": {"name": "display_url", "description": "URL leading to a specific version of a record in the linked external data source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "external_data_source_id": {"name": "external_data_source_id", "description": "ID of the related external data source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "external_id": {"name": "external_id", "description": "The unique identifier of a record in the linked external data source. For example, ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "family": {"name": "family", "description": "Name of the product family associated with this record. Product families are configured as picklists in the user interface. To obtain a list of valid values, call describeSObjects() and process the DescribeSObjectResult for the values associated with the Family field. Label is Product Family.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_active": {"name": "is_active", "description": "Indicates whether this record is active (true) or not (false). Inactive Product2 records are hidden in many areas in the user interface. You can change the IsActive flag on a Product2 object as often as necessary. Label is Active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_archived": {"name": "is_archived", "description": "Describes whether the product is archived. The default value is false.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Required. Default name of this record. Label is Product Name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "number_of_quantity_installments": {"name": "number_of_quantity_installments", "description": "If the product has a quantity schedule, the number of installments.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "number_of_revenue_installments": {"name": "number_of_revenue_installments", "description": "If the product has a revenue schedule, the number of installments.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "product_code": {"name": "product_code", "description": "Default product code for this record. Your org defines the product code naming pattern.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "quantity_installment_period": {"name": "quantity_installment_period", "description": "If the product has a quantity schedule, the amount of time covered by the schedule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "quantity_schedule_type": {"name": "quantity_schedule_type", "description": "The type of the quantity schedule, if the product has one.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "quantity_unit_of_measure": {"name": "quantity_unit_of_measure", "description": "Unit of the product; for example, kilograms, liters, or cases. This field comes with only one value, Each, so consider creating your own. The QuantityUnitOfMeasure field on ProductItem inherits this field\u2019s values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "revenue_installment_period": {"name": "revenue_installment_period", "description": "If the product has a revenue schedule, the time period covered by the schedule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "revenue_schedule_type": {"name": "revenue_schedule_type", "description": "The type of the revenue schedule, if the product has one.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "stock_keeping_unit": {"name": "stock_keeping_unit", "description": "The SKU for the product. Use in tandem with or instead of the ProductCode field. For example, you can track the manufacturer\u2019s identifying code in the Product Code field and assign the product a SKU when you resell it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "system_modstamp": {"name": "system_modstamp", "description": "System Modstamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_product_2_data\"", "created_at": 1698690621.887997}, "source.salesforce_source.salesforce.task": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "task", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.task", "fqn": ["salesforce_source", "salesforce", "salesforce", "task"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_task_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Represents a business activity such as making a phone call or other to-do items. In the user interface, Task and Event records are collectively referred to as activities.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "Represents the ID of the related Account. The AccountId is determined as follows. If the value of WhatId is any of the following objects, then Salesforce uses that object\u2019s AccountId. Account Opportunity Contract Custom object that is a child of Account If the value of the WhatIdfield is any other object, and the value of the WhoId field is a Contact object, then Salesforce uses that contact\u2019s AccountId. (If your organization uses Shared Activities, then Salesforce uses the AccountId of the primary contact.) Otherwise, Salesforce sets the value of the AccountId field to null. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "activity_date": {"name": "activity_date", "description": "Represents the due date of the task. This field has a timestamp that is always set to midnight in the Coordinated Universal Time (UTC) time zone. The timestamp is not relevant; do not attempt to alter it to accommodate time zone differences. Label is Due Date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "call_disposition": {"name": "call_disposition", "description": "Represents the result of a given call, for example, \u201cwe'll call back,\u201d or \u201ccall unsuccessful.\u201d Limit is 255 characters. Not subject to field-level security, available for any user in an organization with Salesforce CRM Call Center.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "call_duration_in_seconds": {"name": "call_duration_in_seconds", "description": "Duration of the call in seconds. Not subject to field-level security, available for any user in an organization with Salesforce CRM Call Center.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "call_object": {"name": "call_object", "description": "Name of a call center. Limit is 255 characters. Not subject to field-level security, available for any user in an organization with Salesforce CRM Call Center.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "call_type": {"name": "call_type", "description": "The type of call being answered: Inbound, Internal, or Outbound.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "completed_date_time": {"name": "completed_date_time", "description": "The date and time the task was saved with a Closed status. For insert, if the task is saved with a Closed status the field is set. If the task is saved with an Open status the field is set to NULL. For update, if the task is saved with a new Closed status, the field is reset. If the task is saved with a new non-closed status, the field is reset to NULL. If the task is saved with the same closed status (that is, unchanged) there is no change to the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Contains a text description of the task.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_archived": {"name": "is_archived", "description": "Indicates whether the event has been archived.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_closed": {"name": "is_closed", "description": "Indicates whether the task has been completed (true) or not (false). Is only set indirectly via the Status picklist. Label is Closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_high_priority": {"name": "is_high_priority", "description": "Indicates a high-priority task. This field is derived from the Priority field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_recurrence": {"name": "is_recurrence", "description": "Indicates whether the task is scheduled to repeat itself (true) or only occurs once (false). This field is read-only on update, but not on create. If this field value is true, then RecurrenceStartDateOnly, RecurrenceEndDateOnly, RecurrenceType, and any recurrence fields associated with the given recurrence type must be populated. See Recurring Tasks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_reminder_set": {"name": "is_reminder_set", "description": "Indicates whether a popup reminder has been set for the task (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "ID of the User or Group who owns the record. Label is Assigned To ID. This field accepts Groups of type Queue only. In the user interface, Group IDs correspond with the queue\u2019s list view names. To create or update tasks assigned to Group, use v48.0 or later. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "priority": {"name": "priority", "description": "Required. Indicates the importance or urgency of a task, such as high or low.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_activity_id": {"name": "recurrence_activity_id", "description": "Read-only. Not required on create. ID of the main record of the recurring task. Subsequent occurrences have the same value in this field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_day_of_month": {"name": "recurrence_day_of_month", "description": "The day of the month in which the task repeats.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_day_of_week_mask": {"name": "recurrence_day_of_week_mask", "description": "The day or days of the week on which the task repeats. This field contains a bitmask. The values are as follows: Sunday = 1 Monday = 2 Tuesday = 4 Wednesday = 8 Thursday = 16 Friday = 32 Saturday = 64 Multiple days are represented as the sum of their numerical values. For example, Tuesday and Thursday = 4 + 16 = 20.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_end_date_only": {"name": "recurrence_end_date_only", "description": "The last date on which the task repeats. This field has a timestamp that is always set to midnight in the Coordinated Universal Time (UTC) time zone. The timestamp is not relevant; do not attempt to alter it to accommodate time zone differences. ", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_instance": {"name": "recurrence_instance", "description": "The frequency of the recurring task. Possible values are: First\u20141st Fourth\u20144th Last\u2014last Second\u20142nd Third\u20143rd", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_interval": {"name": "recurrence_interval", "description": "The interval between recurring tasks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_month_of_year": {"name": "recurrence_month_of_year", "description": "The month of the year in which the task repeats.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_regenerated_type": {"name": "recurrence_regenerated_type", "description": "Represents what triggers a repeating task to repeat. Add this field to a page layout together with the RecurrenceInterval field, which determines the number of days between the triggering date (due date or close date) and the due date of the next repeating task in the series. Label is Repeat This Task. This field has the following picklist values: None: The task doesn\u2019t repeat. After due date: The next repeating task will be due the specified number of days after the current task\u2019s due date. After the task is closed: The next repeating task will be due the specified number of days after the current task is closed. (Task closed): This task, now closed, was opened as part of a repeating series. ", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_start_date_only": {"name": "recurrence_start_date_only", "description": "The date when the recurring task begins. Must be a date and time before RecurrenceEndDateOnly.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_time_zone_sid_key": {"name": "recurrence_time_zone_sid_key", "description": "The time zone associated with the recurring task. For example, \u201cUTC-8:00\u201d for Pacific Standard Time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_type": {"name": "recurrence_type", "description": "Indicates how often the task repeats. For example, daily, weekly, or every nth month (where \u201cnth\u201d is defined in RecurrenceInstance).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reminder_date_time": {"name": "reminder_date_time", "description": "Represents the time when the reminder is scheduled to fire, if IsReminderSet is set to true. If IsReminderSet is set to false, then the user may have deselected the reminder checkbox in the Salesforce user interface, or the reminder has already fired at the time indicated by the value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"name": "status", "description": "Required. The status of the task, such as In Progress or Completed. Each predefined Status field implies a value for the IsClosed flag. To obtain picklist values, query the TaskStatus object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "subject": {"name": "subject", "description": "The subject line of the task, such as \u201cCall\u201d or \u201cSend Quote.\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "system_modstamp": {"name": "system_modstamp", "description": "System Modstamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "task_subtype": {"name": "task_subtype", "description": "Provides standard subtypes to facilitate creating and searching for specific task subtypes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "The type of task, such as Call or Meeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "what_count": {"name": "what_count", "description": "Available to organizations that have Shared Activities enabled. Count of related TaskRelations pertaining to WhatId. Count of the WhatId must be 1 or less.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "what_id": {"name": "what_id", "description": "The WhatId represents nonhuman objects such as accounts, opportunities, campaigns, cases, or custom objects. WhatIds are polymorphic. Polymorphic means a WhatId is equivalent to the ID of a related object. The label is Related To ID. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "who_count": {"name": "who_count", "description": "Available to organizations that have Shared Activities enabled. Count of related TaskRelations pertaining to WhoId.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "who_id": {"name": "who_id", "description": "The WhoId represents a human such as a lead or a contact. WhoIds are polymorphic. Polymorphic means a WhoId is equivalent to a contact\u2019s ID or a lead\u2019s ID. The label is Name ID. If Shared Activities is enabled, the value of this field is the ID of the related lead or primary contact. If you add, update, or remove the WhoId field, you might encounter problems with triggers, workflows, and data validation rules that are associated with the record. The label is Name ID. Beginning in API version 37.0, if the contact or lead ID in the WhoId field is not in the TaskWhoIds list, no error occurs and the ID is added to the TaskWhoIds as the primary WhoId. If WhoId is set to null, an arbitrary ID from the existing TaskWhoIds list is promoted to the primary position.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"sf_task_data\"", "created_at": 1698690621.888208}, "source.salesforce_source.salesforce.fivetran_formula": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "fivetran_formula", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.fivetran_formula", "fqn": ["salesforce_source", "salesforce", "salesforce", "fivetran_formula"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "fivetran_formula", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 24, "period": "hour"}, "error_after": {"count": 48, "period": "hour"}, "filter": null}, "external": null, "description": "Holds the formula fields for each of your custom fields", "columns": {}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"fivetran_formula\"", "created_at": 1698690621.888375}, "source.salesforce_source.salesforce.fivetran_formula_model": {"database": "postgres", "schema": "salesforce_source_integrations_tests_3", "name": "fivetran_formula_model", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.fivetran_formula_model", "fqn": ["salesforce_source", "salesforce", "salesforce", "fivetran_formula_model"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "fivetran_formula_model", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 24, "period": "hour"}, "error_after": {"count": 48, "period": "hour"}, "filter": null}, "external": null, "description": "Holds the formula fields for each of your salesforce objects as a single select statement", "columns": {}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"salesforce_source_integrations_tests_3\".\"fivetran_formula_model\"", "created_at": 1698690621.888536}}, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.668766, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.668999, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.669107, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.6692128, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.669322, "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\n {%- call statement('catalog', fetch_result=True) -%}\n {#\n If the user has multiple databases set and the first one is wrong, this will fail.\n But we won't fail in the case where there are multiple quoting-difference-only dbs, which is better.\n #}\n {% set database = information_schema.database %}\n {{ adapter.verify_database(database) }}\n\n select\n '{{ database }}' as table_database,\n sch.nspname as table_schema,\n tbl.relname as table_name,\n case tbl.relkind\n when 'v' then 'VIEW'\n else 'BASE TABLE'\n end as table_type,\n tbl_desc.description as table_comment,\n col.attname as column_name,\n col.attnum as column_index,\n pg_catalog.format_type(col.atttypid, col.atttypmod) as column_type,\n col_desc.description as column_comment,\n pg_get_userbyid(tbl.relowner) as table_owner\n\n from pg_catalog.pg_namespace sch\n join pg_catalog.pg_class tbl on tbl.relnamespace = sch.oid\n join pg_catalog.pg_attribute col on col.attrelid = tbl.oid\n left outer join pg_catalog.pg_description tbl_desc on (tbl_desc.objoid = tbl.oid and tbl_desc.objsubid = 0)\n left outer join pg_catalog.pg_description col_desc on (col_desc.objoid = tbl.oid and col_desc.objsubid = col.attnum)\n\n where (\n {%- for schema in schemas -%}\n upper(sch.nspname) = upper('{{ schema }}'){%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n )\n and not pg_is_other_temp_schema(sch.oid) -- not a temporary schema belonging to another session\n and tbl.relpersistence in ('p', 'u') -- [p]ermanent table or [u]nlogged table. Exclude [t]emporary tables\n and tbl.relkind in ('r', 'v', 'f', 'p') -- o[r]dinary table, [v]iew, [f]oreign table, [p]artitioned table. Other values are [i]ndex, [S]equence, [c]omposite type, [t]OAST table, [m]aterialized view\n and col.attnum > 0 -- negative numbers are used for system columns such as oid\n and not col.attisdropped -- column as not been dropped\n\n order by\n sch.nspname,\n tbl.relname,\n col.attnum\n\n {%- endcall -%}\n\n {{ return(load_result('catalog').table) }}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.6704059, "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 with relation as (\n select\n pg_rewrite.ev_class as class,\n pg_rewrite.oid as id\n from pg_rewrite\n ),\n class as (\n select\n oid as id,\n relname as name,\n relnamespace as schema,\n relkind as kind\n from pg_class\n ),\n dependency as (\n select distinct\n pg_depend.objid as id,\n pg_depend.refobjid as ref\n from pg_depend\n ),\n schema as (\n select\n pg_namespace.oid as id,\n pg_namespace.nspname as name\n from pg_namespace\n where nspname != 'information_schema' and nspname not like 'pg\\_%'\n ),\n referenced as (\n select\n relation.id AS id,\n referenced_class.name ,\n referenced_class.schema ,\n referenced_class.kind\n from relation\n join class as referenced_class on relation.class=referenced_class.id\n where referenced_class.kind in ('r', 'v', 'm')\n ),\n relationships as (\n select\n referenced.name as referenced_name,\n referenced.schema as referenced_schema_id,\n dependent_class.name as dependent_name,\n dependent_class.schema as dependent_schema_id,\n referenced.kind as kind\n from referenced\n join dependency on referenced.id=dependency.id\n join class as dependent_class on dependency.ref=dependent_class.id\n where\n (referenced.name != dependent_class.name or\n referenced.schema != dependent_class.schema)\n )\n\n select\n referenced_schema.name as referenced_schema,\n relationships.referenced_name as referenced_name,\n dependent_schema.name as dependent_schema,\n relationships.dependent_name as dependent_name\n from relationships\n join schema as dependent_schema on relationships.dependent_schema_id=dependent_schema.id\n join schema as referenced_schema on relationships.referenced_schema_id=referenced_schema.id\n group by referenced_schema, referenced_name, dependent_schema, dependent_name\n order by referenced_schema, referenced_name, dependent_schema, dependent_name;\n\n {%- endcall -%}\n\n {{ return(load_result('relations').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.671042, "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 {{ 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}, "patch_path": null, "arguments": [], "created_at": 1698690620.67906, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.679649, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.67998, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.680296, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.680754, "supported_languages": null}, "macro.dbt_postgres.postgres__list_relations_without_caching": {"name": "postgres__list_relations_without_caching", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__list_relations_without_caching", "macro_sql": "{% macro postgres__list_relations_without_caching(schema_relation) %}\n {% call statement('list_relations_without_caching', fetch_result=True) -%}\n select\n '{{ schema_relation.database }}' as database,\n tablename as name,\n schemaname as schema,\n 'table' as type\n from pg_tables\n where schemaname ilike '{{ schema_relation.schema }}'\n union all\n select\n '{{ schema_relation.database }}' as database,\n viewname as name,\n schemaname as schema,\n 'view' as type\n from pg_views\n where schemaname ilike '{{ schema_relation.schema }}'\n union all\n select\n '{{ schema_relation.database }}' as database,\n matviewname as name,\n schemaname as schema,\n 'materialized_view' as type\n from pg_matviews\n where schemaname ilike '{{ schema_relation.schema }}'\n {% endcall %}\n {{ return(load_result('list_relations_without_caching').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.6811972, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.68138, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.681715, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.682199, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.683069, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.683273, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.683582, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.6838489, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.684264, "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 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}, "patch_path": null, "arguments": [], "created_at": 1698690620.684484, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.685055, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.685262, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.6853702, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.685538, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.685668, "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/materializations/materialized_view.sql", "original_file_path": "macros/materializations/materialized_view.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_materialized_view_as_sql(relation, sql, existing_relation, backup_relation, intermediate_relation) }}\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_materialized_view_as_sql", "macro.dbt_postgres.postgres__update_indexes_on_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.68755, "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/materializations/materialized_view.sql", "original_file_path": "macros/materializations/materialized_view.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) -}}\n {%- endfor -%}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.687853, "supported_languages": null}, "macro.dbt_postgres.postgres__get_replace_materialized_view_as_sql": {"name": "postgres__get_replace_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/materialized_view.sql", "original_file_path": "macros/materializations/materialized_view.sql", "unique_id": "macro.dbt_postgres.postgres__get_replace_materialized_view_as_sql", "macro_sql": "{% macro postgres__get_replace_materialized_view_as_sql(relation, sql, existing_relation, backup_relation, intermediate_relation) %}\n {{- get_create_materialized_view_as_sql(intermediate_relation, sql) -}}\n\n {% if existing_relation is not none %}\n alter materialized view {{ existing_relation }} rename to {{ backup_relation.include(database=False, schema=False) }};\n {% endif %}\n\n alter materialized view {{ intermediate_relation }} rename to {{ relation.include(database=False, schema=False) }};\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_create_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.6882648, "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/materializations/materialized_view.sql", "original_file_path": "macros/materializations/materialized_view.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) %}\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}, "patch_path": null, "arguments": [], "created_at": 1698690620.688555, "supported_languages": null}, "macro.dbt_postgres.postgres__refresh_materialized_view": {"name": "postgres__refresh_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/materialized_view.sql", "original_file_path": "macros/materializations/materialized_view.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.6886542, "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/materializations/materialized_view.sql", "original_file_path": "macros/materializations/materialized_view.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\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}, "patch_path": null, "arguments": [], "created_at": 1698690620.6891038, "supported_languages": null}, "macro.dbt_postgres.postgres__describe_materialized_view": {"name": "postgres__describe_materialized_view", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/materializations/materialized_view.sql", "original_file_path": "macros/materializations/materialized_view.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.689352, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.689736, "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 update {{ target }}\n set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to\n from {{ source }} as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.dbt_scd_id::text = {{ target }}.dbt_scd_id::text\n and DBT_INTERNAL_SOURCE.dbt_change_type::text in ('update'::text, 'delete'::text)\n and {{ target }}.dbt_valid_to is null;\n\n insert into {{ target }} ({{ insert_cols_csv }})\n select {% for column in insert_cols -%}\n DBT_INTERNAL_SOURCE.{{ column }} {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n from {{ source }} as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.dbt_change_type::text = 'insert'::text;\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.690416, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.690627, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.691984, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.6953442, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.695534, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.695992, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.696364, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.697333, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.697516, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.697643, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.697768, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.6978931, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.698223, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.6984909, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.6987798, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.69917, "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 merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on DBT_INTERNAL_SOURCE.dbt_scd_id = DBT_INTERNAL_DEST.dbt_scd_id\n\n when matched\n and DBT_INTERNAL_DEST.dbt_valid_to is null\n and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete')\n then update\n set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to\n\n when not matched\n and DBT_INTERNAL_SOURCE.dbt_change_type = 'insert'\n then insert ({{ insert_cols_csv }})\n values ({{ insert_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.69941, "supported_languages": null}, "macro.dbt.strategy_dispatch": {"name": "strategy_dispatch", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.strategy_dispatch", "macro_sql": "{% macro strategy_dispatch(name) -%}\n{% set original_name = name %}\n {% if '.' in name %}\n {% set package_name, name = name.split(\".\", 1) %}\n {% else %}\n {% set package_name = none %}\n {% endif %}\n\n {% if package_name is none %}\n {% set package_context = context %}\n {% elif package_name in context %}\n {% set package_context = context[package_name] %}\n {% else %}\n {% set error_msg %}\n Could not find package '{{package_name}}', called with '{{original_name}}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n\n {%- set search_name = 'snapshot_' ~ name ~ '_strategy' -%}\n\n {% if search_name not in package_context %}\n {% set error_msg %}\n The specified strategy macro '{{name}}' was not found in package '{{ package_name }}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n {{ return(package_context[search_name]) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.703611, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.7037902, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.703999, "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, config, target_exists) %}\n {% set primary_key = config['unique_key'] %}\n {% set updated_at = config['updated_at'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n\n {#/*\n The snapshot relation might not have an {{ updated_at }} value if the\n snapshot strategy is changed from `check` to `timestamp`. We\n should use a dbt-created column for the comparison in the snapshot\n table instead of assuming that the user-supplied {{ updated_at }}\n will be present in the historical data.\n\n See https://github.com/dbt-labs/dbt-core/issues/2350\n */ #}\n {% set row_changed_expr -%}\n ({{ snapshotted_rel }}.dbt_valid_from < {{ current_rel }}.{{ updated_at }})\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes\n }) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.704663, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.704818, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.7049758, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.7062411, "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, config, target_exists) %}\n {% set check_cols_config = config['check_cols'] %}\n {% set primary_key = config['unique_key'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n {% set updated_at = config.get('updated_at', snapshot_get_time()) %}\n\n {% set column_added = false %}\n\n {% set column_added, check_cols = snapshot_check_all_get_existing_columns(node, target_exists, check_cols_config) %}\n\n {%- set row_changed_expr -%}\n (\n {%- if column_added -%}\n {{ get_true_sql() }}\n {%- else -%}\n {%- for col in check_cols -%}\n {{ snapshotted_rel }}.{{ col }} != {{ current_rel }}.{{ col }}\n or\n (\n (({{ snapshotted_rel }}.{{ col }} is null) and not ({{ current_rel }}.{{ col }} is null))\n or\n ((not {{ snapshotted_rel }}.{{ col }} is null) and ({{ current_rel }}.{{ col }} is null))\n )\n {%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n {%- endif -%}\n )\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes\n }) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt.snapshot_check_all_get_existing_columns", "macro.dbt.get_true_sql", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.707466, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.710898, "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 }} add column \"{{ column.name }}\" {{ column.data_type }};\n {% endcall %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.711152, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.711304, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.711382, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.711804, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.711978, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.712288, "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\n with snapshot_query as (\n\n {{ source_sql }}\n\n ),\n\n snapshotted_data as (\n\n select *,\n {{ strategy.unique_key }} as dbt_unique_key\n\n from {{ target_relation }}\n where dbt_valid_to is null\n\n ),\n\n insertions_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to,\n {{ strategy.scd_id }} as dbt_scd_id\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n {{ strategy.updated_at }} as dbt_valid_to\n\n from snapshot_query\n ),\n\n {%- if strategy.invalidate_hard_deletes %}\n\n deletes_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key\n from snapshot_query\n ),\n {% endif %}\n\n insertions as (\n\n select\n 'insert' as dbt_change_type,\n source_data.*\n\n from insertions_source_data as source_data\n left outer join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where snapshotted_data.dbt_unique_key is null\n or (\n snapshotted_data.dbt_unique_key is not null\n and (\n {{ strategy.row_changed }}\n )\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.dbt_scd_id\n\n from updates_source_data as source_data\n join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where (\n {{ strategy.row_changed }}\n )\n )\n\n {%- if strategy.invalidate_hard_deletes -%}\n ,\n\n deletes as (\n\n select\n 'delete' as dbt_change_type,\n source_data.*,\n {{ snapshot_get_time() }} as dbt_valid_from,\n {{ snapshot_get_time() }} as dbt_updated_at,\n {{ snapshot_get_time() }} as dbt_valid_to,\n snapshotted_data.dbt_scd_id\n\n from snapshotted_data\n left join deletes_source_data as source_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where source_data.dbt_unique_key is null\n )\n {%- endif %}\n\n select * from insertions\n union all\n select * from updates\n {%- if strategy.invalidate_hard_deletes %}\n union all\n select * from deletes\n {%- endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.7140968, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.714348, "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\n select *,\n {{ strategy.scd_id }} as dbt_scd_id,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to\n from (\n {{ sql }}\n ) sbq\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.714782, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.715229, "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 {%- set config = model['config'] -%}\n\n {%- set target_table = model.get('alias', model.get('name')) -%}\n\n {%- set strategy_name = config.get('strategy') -%}\n {%- set unique_key = config.get('unique_key') %}\n -- grab current tables grants config for comparision later on\n {%- set grant_config = config.get('grants') -%}\n\n {% set target_relation_exists, target_relation = get_or_create_relation(\n database=model.database,\n schema=model.schema,\n identifier=target_table,\n type='table') -%}\n\n {%- if not target_relation.is_table -%}\n {% do exceptions.relation_wrong_type(target_relation, 'table') %}\n {%- endif -%}\n\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set strategy_macro = strategy_dispatch(strategy_name) %}\n {% set strategy = strategy_macro(model, \"snapshotted_data\", \"source_data\", config, target_relation_exists) %}\n\n {% if not target_relation_exists %}\n\n {% set build_sql = build_snapshot_table(strategy, model['compiled_code']) %}\n {% set final_sql = create_table_as(False, target_relation, build_sql) %}\n\n {% else %}\n\n {{ adapter.valid_snapshot_target(target_relation) }}\n\n {% set staging_table = build_snapshot_staging_table(strategy, sql, target_relation) %}\n\n -- this may no-op if the database does not require column expansion\n {% do adapter.expand_target_column_types(from_relation=staging_table,\n to_relation=target_relation) %}\n\n {% set missing_columns = adapter.get_missing_columns(staging_table, target_relation)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\n | list %}\n\n {% do create_columns(target_relation, missing_columns) %}\n\n {% set source_columns = adapter.get_columns_in_relation(staging_table)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\n | list %}\n\n {% set quoted_source_columns = [] %}\n {% for column in source_columns %}\n {% do quoted_source_columns.append(adapter.quote(column.name)) %}\n {% endfor %}\n\n {% set final_sql = snapshot_merge_sql(\n target = target_relation,\n source = staging_table,\n insert_cols = quoted_source_columns\n )\n %}\n\n {% endif %}\n\n {% call statement('main') %}\n {{ final_sql }}\n {% endcall %}\n\n {% set should_revoke = should_revoke(target_relation_exists, full_refresh_mode=False) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if not target_relation_exists %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {% if staging_table is defined %}\n {% do post_snapshot(staging_table) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.get_or_create_relation", "macro.dbt.run_hooks", "macro.dbt.strategy_dispatch", "macro.dbt.build_snapshot_table", "macro.dbt.create_table_as", "macro.dbt.build_snapshot_staging_table", "macro.dbt.create_columns", "macro.dbt.snapshot_merge_sql", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes", "macro.dbt.post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.720706, "supported_languages": ["sql"]}, "macro.dbt.materialization_test_default": {"name": "materialization_test_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/test.sql", "original_file_path": "macros/materializations/tests/test.sql", "unique_id": "macro.dbt.materialization_test_default", "macro_sql": "{%- materialization test, default -%}\n\n {% set relations = [] %}\n\n {% if should_store_failures() %}\n\n {% set identifier = model['alias'] %}\n {% set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n {% set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database, type='table') -%} %}\n\n {% if old_relation %}\n {% do adapter.drop_relation(old_relation) %}\n {% endif %}\n\n {% call statement(auto_begin=True) %}\n {{ create_table_as(False, target_relation, sql) }}\n {% endcall %}\n\n {% do relations.append(target_relation) %}\n\n {% set main_sql %}\n select *\n from {{ target_relation }}\n {% endset %}\n\n {{ adapter.commit() }}\n\n {% else %}\n\n {% set main_sql = sql %}\n\n {% endif %}\n\n {% set limit = config.get('limit') %}\n {% set fail_calc = config.get('fail_calc') %}\n {% set warn_if = config.get('warn_if') %}\n {% set error_if = config.get('error_if') %}\n\n {% call statement('main', fetch_result=True) -%}\n\n {{ get_test_sql(main_sql, fail_calc, warn_if, error_if, limit)}}\n\n {%- endcall %}\n\n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.should_store_failures", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt.get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.72278, "supported_languages": ["sql"]}, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.723781, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.724134, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.724517, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.724998, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.727572, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.728263, "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\n {% set result = [] %}\n {% for sc in source_columns %}\n {% set tc = target_columns | selectattr(\"name\", \"equalto\", sc.name) | list | first %}\n {% if tc %}\n {% if sc.data_type != tc.data_type and not sc.can_expand_to(other_column=tc) %}\n {{ result.append( { 'column_name': tc.name, 'new_type': sc.data_type } ) }}\n {% endif %}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.728885, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.7291021, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.729742, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.7360141, "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 unique_key_match %}\n DBT_INTERNAL_SOURCE.{{ unique_key }} = DBT_INTERNAL_DEST.{{ unique_key }}\n {% endset %}\n {% do predicates.append(unique_key_match) %}\n {% endif %}\n {% else %}\n {% do predicates.append('FALSE') %}\n {% endif %}\n\n {{ sql_header if sql_header is not none }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on {{\"(\" ~ predicates | join(\") and (\") ~ \")\"}}\n\n {% if unique_key %}\n when matched then update set\n {% for column_name in update_columns -%}\n {{ column_name }} = DBT_INTERNAL_SOURCE.{{ column_name }}\n {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n {% endif %}\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv", "macro.dbt.get_merge_update_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.7377589, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.7380438, "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 sequence and unique_key is not string %}\n delete from {{target }}\n using {{ source }}\n where (\n {% for key in unique_key %}\n {{ source }}.{{ key }} = {{ target }}.{{ key }}\n {{ \"and \" if not loop.last}}\n {% endfor %}\n {% if incremental_predicates %}\n {% for predicate in incremental_predicates %}\n and {{ predicate }}\n {% endfor %}\n {% endif %}\n );\n {% else %}\n delete from {{ target }}\n where (\n {{ unique_key }}) in (\n select ({{ unique_key }})\n from {{ source }}\n )\n {%- if incremental_predicates %}\n {% for predicate in incremental_predicates %}\n and {{ predicate }}\n {% endfor %}\n {%- endif -%};\n\n {% endif %}\n {% endif %}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.738988, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.73927, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.7399008, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.740521, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.741369, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.7415922, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.741764, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.742037, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.742209, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.7424839, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.742657, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.742901, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.743076, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.743211, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.743535, "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 {% if existing_relation is none %}\n {% set build_sql = get_create_table_as_sql(False, target_relation, sql) %}\n {% elif full_refresh_mode %}\n {% set build_sql = get_create_table_as_sql(False, intermediate_relation, sql) %}\n {% set need_swap = true %}\n {% else %}\n {% do run_query(get_create_table_as_sql(True, temp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=temp_relation,\n to_relation=target_relation) %}\n {#-- Process schema changes. Returns dict of changes if successful. Use source columns for upserting/merging --#}\n {% set dest_columns = process_schema_changes(on_schema_change, temp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n\n {#-- Get the incremental_strategy, the macro to use for the strategy, and build the sql --#}\n {% set incremental_strategy = config.get('incremental_strategy') or 'default' %}\n {% set incremental_predicates = config.get('predicates', none) or config.get('incremental_predicates', none) %}\n {% set strategy_sql_macro_func = adapter.get_incremental_strategy_macro(context, incremental_strategy) %}\n {% set strategy_arg_dict = ({'target_relation': target_relation, 'temp_relation': temp_relation, 'unique_key': unique_key, 'dest_columns': dest_columns, '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 need_swap %}\n {% do adapter.rename_relation(target_relation, backup_relation) %}\n {% do adapter.rename_relation(intermediate_relation, target_relation) %}\n {% do to_drop.append(backup_relation) %}\n {% endif %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {% do adapter.commit() %}\n\n {% for rel in to_drop %}\n {% do adapter.drop_relation(rel) %}\n {% endfor %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_temp_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.should_full_refresh", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.get_create_table_as_sql", "macro.dbt.run_query", "macro.dbt.process_schema_changes", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.7504158, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.755927, "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\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}, "patch_path": null, "arguments": [], "created_at": 1698690620.757996, "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\n {%- set add_to_target_arr = schema_changes_dict['source_not_in_target'] -%}\n\n {%- if on_schema_change == 'append_new_columns'-%}\n {%- if add_to_target_arr | length > 0 -%}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, none) -%}\n {%- endif -%}\n\n {% elif on_schema_change == 'sync_all_columns' %}\n {%- set remove_from_target_arr = schema_changes_dict['target_not_in_source'] -%}\n {%- set new_target_types = schema_changes_dict['new_target_types'] -%}\n\n {% if add_to_target_arr | length > 0 or remove_from_target_arr | length > 0 %}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, remove_from_target_arr) -%}\n {% endif %}\n\n {% if new_target_types != [] %}\n {% for ntt in new_target_types %}\n {% set column_name = ntt['column_name'] %}\n {% set new_type = ntt['new_type'] %}\n {% do alter_column_type(target_relation, column_name, new_type) %}\n {% endfor %}\n {% endif %}\n\n {% endif %}\n\n {% set schema_change_message %}\n In {{ target_relation }}:\n Schema change approach: {{ on_schema_change }}\n Columns added: {{ add_to_target_arr }}\n Columns removed: {{ remove_from_target_arr }}\n Data types changed: {{ new_target_types }}\n {% endset %}\n\n {% do log(schema_change_message) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.alter_relation_add_remove_columns", "macro.dbt.alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.7593532, "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\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}, "patch_path": null, "arguments": [], "created_at": 1698690620.760538, "supported_languages": null}, "macro.dbt.materialization_materialized_view_default": {"name": "materialization_materialized_view_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view/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}, "patch_path": null, "arguments": [], "created_at": 1698690620.766747, "supported_languages": ["sql"]}, "macro.dbt.materialized_view_setup": {"name": "materialized_view_setup", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view/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}, "patch_path": null, "arguments": [], "created_at": 1698690620.767173, "supported_languages": null}, "macro.dbt.materialized_view_teardown": {"name": "materialized_view_teardown", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view/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}, "patch_path": null, "arguments": [], "created_at": 1698690620.767414, "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/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view/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_materialized_view_as_sql(target_relation, sql, existing_relation, backup_relation, intermediate_relation) %}\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 ~ \"`\") }}\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 ~ \"`\") }}\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_materialized_view_as_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}, "patch_path": null, "arguments": [], "created_at": 1698690620.768616, "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/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view/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}, "patch_path": null, "arguments": [], "created_at": 1698690620.768828, "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/materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view/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}, "patch_path": null, "arguments": [], "created_at": 1698690620.769415, "supported_languages": null}, "macro.dbt.get_materialized_view_configuration_changes": {"name": "get_materialized_view_configuration_changes", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view/get_materialized_view_configuration_changes.sql", "original_file_path": "macros/materializations/models/materialized_view/get_materialized_view_configuration_changes.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.769826, "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/materializations/models/materialized_view/get_materialized_view_configuration_changes.sql", "original_file_path": "macros/materializations/models/materialized_view/get_materialized_view_configuration_changes.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.7699578, "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/materializations/models/materialized_view/alter_materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view/alter_materialized_view.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.770389, "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/materializations/models/materialized_view/alter_materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view/alter_materialized_view.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.7705688, "supported_languages": null}, "macro.dbt.refresh_materialized_view": {"name": "refresh_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view/refresh_materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view/refresh_materialized_view.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.770858, "supported_languages": null}, "macro.dbt.default__refresh_materialized_view": {"name": "default__refresh_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view/refresh_materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view/refresh_materialized_view.sql", "unique_id": "macro.dbt.default__refresh_materialized_view", "macro_sql": "{% macro default__refresh_materialized_view(relation) %}\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}, "patch_path": null, "arguments": [], "created_at": 1698690620.770987, "supported_languages": null}, "macro.dbt.get_replace_materialized_view_as_sql": {"name": "get_replace_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view/replace_materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view/replace_materialized_view.sql", "unique_id": "macro.dbt.get_replace_materialized_view_as_sql", "macro_sql": "{% macro get_replace_materialized_view_as_sql(relation, sql, existing_relation, backup_relation, intermediate_relation) %}\n {{- log('Applying REPLACE to: ' ~ relation) -}}\n {{- adapter.dispatch('get_replace_materialized_view_as_sql', 'dbt')(relation, sql, existing_relation, backup_relation, intermediate_relation) -}}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_postgres.postgres__get_replace_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.77138, "supported_languages": null}, "macro.dbt.default__get_replace_materialized_view_as_sql": {"name": "default__get_replace_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/materialized_view/replace_materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view/replace_materialized_view.sql", "unique_id": "macro.dbt.default__get_replace_materialized_view_as_sql", "macro_sql": "{% macro default__get_replace_materialized_view_as_sql(relation, sql, existing_relation, backup_relation, intermediate_relation) %}\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}, "patch_path": null, "arguments": [], "created_at": 1698690620.771626, "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/materializations/models/materialized_view/create_materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view/create_materialized_view.sql", "unique_id": "macro.dbt.get_create_materialized_view_as_sql", "macro_sql": "{% macro get_create_materialized_view_as_sql(relation, sql) -%}\n {{- log('Applying CREATE to: ' ~ relation) -}}\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}, "patch_path": null, "arguments": [], "created_at": 1698690620.771939, "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/materializations/models/materialized_view/create_materialized_view.sql", "original_file_path": "macros/materializations/models/materialized_view/create_materialized_view.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(\"Materialized views have not been implemented for this adapter.\") }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.7720718, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.772287, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.772398, "supported_languages": null}, "macro.dbt.create_or_replace_clone": {"name": "create_or_replace_clone", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/create_or_replace_clone.sql", "original_file_path": "macros/materializations/models/clone/create_or_replace_clone.sql", "unique_id": "macro.dbt.create_or_replace_clone", "macro_sql": "{% macro create_or_replace_clone(this_relation, defer_relation) %}\n {{ return(adapter.dispatch('create_or_replace_clone', 'dbt')(this_relation, defer_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_or_replace_clone"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.7726688, "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 }} clone {{ defer_relation }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.772796, "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\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 ~ \" 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 {% call statement('main') %}\n {{ create_or_replace_clone(target_relation, defer_relation) }}\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 {% 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}, "patch_path": null, "arguments": [], "created_at": 1698690620.7760692, "supported_languages": ["sql"]}, "macro.dbt.get_table_columns_and_constraints": {"name": "get_table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/columns_spec_ddl.sql", "original_file_path": "macros/materializations/models/table/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}, "patch_path": null, "arguments": [], "created_at": 1698690620.777398, "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/materializations/models/table/columns_spec_ddl.sql", "original_file_path": "macros/materializations/models/table/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}, "patch_path": null, "arguments": [], "created_at": 1698690620.777632, "supported_languages": null}, "macro.dbt.table_columns_and_constraints": {"name": "table_columns_and_constraints", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/columns_spec_ddl.sql", "original_file_path": "macros/materializations/models/table/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}, "patch_path": null, "arguments": [], "created_at": 1698690620.7785542, "supported_languages": null}, "macro.dbt.get_assert_columns_equivalent": {"name": "get_assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/columns_spec_ddl.sql", "original_file_path": "macros/materializations/models/table/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}, "patch_path": null, "arguments": [], "created_at": 1698690620.778778, "supported_languages": null}, "macro.dbt.default__get_assert_columns_equivalent": {"name": "default__get_assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/columns_spec_ddl.sql", "original_file_path": "macros/materializations/models/table/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}, "patch_path": null, "arguments": [], "created_at": 1698690620.77895, "supported_languages": null}, "macro.dbt.assert_columns_equivalent": {"name": "assert_columns_equivalent", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/columns_spec_ddl.sql", "original_file_path": "macros/materializations/models/table/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}, "patch_path": null, "arguments": [], "created_at": 1698690620.7809842, "supported_languages": null}, "macro.dbt.format_columns": {"name": "format_columns", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/columns_spec_ddl.sql", "original_file_path": "macros/materializations/models/table/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}, "patch_path": null, "arguments": [], "created_at": 1698690620.781424, "supported_languages": null}, "macro.dbt.default__format_column": {"name": "default__format_column", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/columns_spec_ddl.sql", "original_file_path": "macros/materializations/models/table/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}, "patch_path": null, "arguments": [], "created_at": 1698690620.781937, "supported_languages": null}, "macro.dbt.materialization_table_default": {"name": "materialization_table_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/table.sql", "original_file_path": "macros/materializations/models/table/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 -- 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 {% do create_indexes(target_relation) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n -- finally, drop the existing/backup relation after the commit\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.get_create_table_as_sql", "macro.dbt.create_indexes", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.7846951, "supported_languages": ["sql"]}, "macro.dbt.get_create_table_as_sql": {"name": "get_create_table_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.785538, "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/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.785716, "supported_languages": null}, "macro.dbt.create_table_as": {"name": "create_table_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.786121, "supported_languages": null}, "macro.dbt.default__create_table_as": {"name": "default__create_table_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.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 %}\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}, "patch_path": null, "arguments": [], "created_at": 1698690620.786734, "supported_languages": null}, "macro.dbt.default__get_column_names": {"name": "default__get_column_names", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.787174, "supported_languages": null}, "macro.dbt.get_select_subquery": {"name": "get_select_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.787349, "supported_languages": null}, "macro.dbt.default__get_select_subquery": {"name": "default__get_select_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.787513, "supported_languages": null}, "macro.dbt.materialization_view_default": {"name": "materialization_view_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view/view.sql", "original_file_path": "macros/materializations/models/view/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}, "patch_path": null, "arguments": [], "created_at": 1698690620.790339, "supported_languages": ["sql"]}, "macro.dbt.handle_existing_table": {"name": "handle_existing_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.790663, "supported_languages": null}, "macro.dbt.default__handle_existing_table": {"name": "default__handle_existing_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.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 ~ \" 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}, "patch_path": null, "arguments": [], "created_at": 1698690620.7908921, "supported_languages": null}, "macro.dbt.create_or_replace_view": {"name": "create_or_replace_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view/create_or_replace_view.sql", "original_file_path": "macros/materializations/models/view/create_or_replace_view.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.7922518, "supported_languages": null}, "macro.dbt.get_create_view_as_sql": {"name": "get_create_view_as_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.792634, "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/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.792778, "supported_languages": null}, "macro.dbt.create_view_as": {"name": "create_view_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.792942, "supported_languages": null}, "macro.dbt.default__create_view_as": {"name": "default__create_view_as", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.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 }}\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}, "patch_path": null, "arguments": [], "created_at": 1698690620.793323, "supported_languages": null}, "macro.dbt.materialization_seed_default": {"name": "materialization_seed_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/seeds/seed.sql", "original_file_path": "macros/materializations/seeds/seed.sql", "unique_id": "macro.dbt.materialization_seed_default", "macro_sql": "{% materialization seed, default %}\n\n {%- set identifier = model['alias'] -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set grant_config = config.get('grants') -%}\n {%- set agate_table = load_agate_table() -%}\n -- grab current tables grants config for comparison later on\n\n {%- do store_result('agate_table', response='OK', agate_table=agate_table) -%}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% set create_table_sql = \"\" %}\n {% if exists_as_view %}\n {{ exceptions.raise_compiler_error(\"Cannot seed to '{}', it is a view\".format(old_relation)) }}\n {% elif exists_as_table %}\n {% set create_table_sql = reset_csv_table(model, full_refresh_mode, old_relation, agate_table) %}\n {% else %}\n {% set create_table_sql = create_csv_table(model, agate_table) %}\n {% endif %}\n\n {% set code = 'CREATE' if full_refresh_mode else 'INSERT' %}\n {% set rows_affected = (agate_table.rows | length) %}\n {% set sql = load_csv_rows(model, agate_table) %}\n\n {% call noop_statement('main', code ~ ' ' ~ rows_affected, code, rows_affected) %}\n {{ get_csv_sql(create_table_sql, sql) }};\n {% endcall %}\n\n {% set target_relation = this.incorporate(type='table') %}\n\n {% set should_revoke = should_revoke(old_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if full_refresh_mode or not exists_as_table %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.run_hooks", "macro.dbt.reset_csv_table", "macro.dbt.create_csv_table", "macro.dbt.load_csv_rows", "macro.dbt.noop_statement", "macro.dbt.get_csv_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.796256, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.800423, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8012228, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.801429, "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 %}\n {% endif %}\n\n {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.8018508, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.802034, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.802154, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.802279, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.802381, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.80252, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.802625, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.803047, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8032079, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8043451, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8047302, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.805065, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.805534, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.805762, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.806016, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.806368, "supported_languages": null}, "macro.dbt.default__generate_database_name": {"name": "default__generate_database_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "unique_id": "macro.dbt.default__generate_database_name", "macro_sql": "{% macro default__generate_database_name(custom_database_name=none, node=none) -%}\n {%- set default_database = target.database -%}\n {%- if custom_database_name is none -%}\n\n {{ default_database }}\n\n {%- else -%}\n\n {{ custom_database_name }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.806595, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8069131, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.807178, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.807401, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8079062, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.809433, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8100212, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.810285, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.811863, "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 Partiton start date is after the end date ({{ start_date }}, {{ end_date }})\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg, model) }}\n {% endif %}\n\n {% set date_list = [] %}\n {% for i in range(0, day_count + 1) %}\n {% set the_date = (modules.datetime.timedelta(days=i) + start_date) %}\n {% if not out_fmt %}\n {% set _ = date_list.append(the_date) %}\n {% else %}\n {% set _ = date_list.append(the_date.strftime(out_fmt)) %}\n {% endif %}\n {% endfor %}\n\n {{ return(date_list) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.convert_datetime"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.812906, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8135722, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.813781, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.813984, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.81405, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.814341, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.814484, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.814703, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8148139, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.815043, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.815135, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.81544, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.81559, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.815787, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.815853, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.816086, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.816212, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.81647, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8166552, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.817199, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8175502, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.817845, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8179898, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8182452, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.818368, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.818676, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8190348, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.819616, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8199208, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8204439, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8205812, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.820917, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8211288, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.821516, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.821648, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.823046, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.823207, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.823637, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.823788, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.824162, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.824426, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8247318, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8251698, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.825484, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.82572, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.825963, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.826112, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.826272, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.826484, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8269498, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.827134, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.827434, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.827529, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8278358, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.828086, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.828219, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.828681, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.829099, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.829299, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.829545, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8296618, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8302221, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.830553, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.830988, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.831243, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.831719, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8320189, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.832226, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.832524, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.833195, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.833407, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.833598, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.833788, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8340359, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.834142, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.834392, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8347251, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.835716, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.835903, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.836095, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.836831, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.837087, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.837304, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8374872, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.837635, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8416069, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8418272, "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 {{ 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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8420732, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.842487, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.842758, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.843122, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8433301, "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 }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.843523, "supported_languages": null}, "macro.dbt.rename_relation": {"name": "rename_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.843762, "supported_languages": null}, "macro.dbt.default__rename_relation": {"name": "default__rename_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.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 }} rename to {{ target_name }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.844207, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8445382, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8451278, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.845393, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.845545, "supported_languages": null}, "macro.dbt.drop_relation_if_exists": {"name": "drop_relation_if_exists", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8457558, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8465002, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.847133, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.847532, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.847766, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.849849, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.849973, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.850173, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.850314, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.850765, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.851103, "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 }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.851211, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.851428, "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 }} to {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.851681, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.851947, "supported_languages": null}, "macro.dbt.default__get_revoke_sql": {"name": "default__get_revoke_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_revoke_sql", "macro_sql": "\n\n{%- macro default__get_revoke_sql(relation, privilege, grantees) -%}\n revoke {{ privilege }} on {{ relation }} from {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.852315, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8526, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.853529, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.853812, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.854283, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.854594, "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 ~': 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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8565388, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.857913, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.858151, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.858426, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.858588, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.858839, "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 {% do run_query(alter_column_comment(relation, model.columns)) %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.859283, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8606029, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.860842, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.861012, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.861151, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.861315, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.86153, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.861714, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.862066, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.862234, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.862376, "supported_languages": null}, "macro.dbt.drop_relation": {"name": "drop_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/drop_relation.sql", "original_file_path": "macros/adapters/drop_relation.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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8634439, "supported_languages": null}, "macro.dbt.default__drop_relation": {"name": "default__drop_relation", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/drop_relation.sql", "original_file_path": "macros/adapters/drop_relation.sql", "unique_id": "macro.dbt.default__drop_relation", "macro_sql": "{% macro default__drop_relation(relation) -%}\n {% call statement('drop_relation', auto_begin=False) -%}\n {%- if relation.is_table -%}\n {{- drop_table(relation) -}}\n {%- elif relation.is_view -%}\n {{- drop_view(relation) -}}\n {%- elif relation.is_materialized_view -%}\n {{- drop_materialized_view(relation) -}}\n {%- else -%}\n drop {{ relation.type }} if exists {{ relation }} cascade\n {%- endif -%}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.drop_table", "macro.dbt.drop_view", "macro.dbt.drop_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.864087, "supported_languages": null}, "macro.dbt.drop_table": {"name": "drop_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/drop_relation.sql", "original_file_path": "macros/adapters/drop_relation.sql", "unique_id": "macro.dbt.drop_table", "macro_sql": "{% macro drop_table(relation) -%}\n {{ return(adapter.dispatch('drop_table', 'dbt')(relation)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__drop_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.8642912, "supported_languages": null}, "macro.dbt.default__drop_table": {"name": "default__drop_table", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/drop_relation.sql", "original_file_path": "macros/adapters/drop_relation.sql", "unique_id": "macro.dbt.default__drop_table", "macro_sql": "{% macro default__drop_table(relation) -%}\n drop table if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.864395, "supported_languages": null}, "macro.dbt.drop_view": {"name": "drop_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/drop_relation.sql", "original_file_path": "macros/adapters/drop_relation.sql", "unique_id": "macro.dbt.drop_view", "macro_sql": "{% macro drop_view(relation) -%}\n {{ return(adapter.dispatch('drop_view', 'dbt')(relation)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__drop_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.8645701, "supported_languages": null}, "macro.dbt.default__drop_view": {"name": "default__drop_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/drop_relation.sql", "original_file_path": "macros/adapters/drop_relation.sql", "unique_id": "macro.dbt.default__drop_view", "macro_sql": "{% macro default__drop_view(relation) -%}\n drop view if exists {{ relation }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.864675, "supported_languages": null}, "macro.dbt.drop_materialized_view": {"name": "drop_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/drop_relation.sql", "original_file_path": "macros/adapters/drop_relation.sql", "unique_id": "macro.dbt.drop_materialized_view", "macro_sql": "{% macro drop_materialized_view(relation) -%}\n {{ return(adapter.dispatch('drop_materialized_view', 'dbt')(relation)) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__drop_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.8648582, "supported_languages": null}, "macro.dbt.default__drop_materialized_view": {"name": "default__drop_materialized_view", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/drop_relation.sql", "original_file_path": "macros/adapters/drop_relation.sql", "unique_id": "macro.dbt.default__drop_materialized_view", "macro_sql": "{% macro default__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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8649669, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.867871, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.868107, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.868525, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.868801, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.869099, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.869395, "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 select\n {% for i in columns %}\n {%- set col = columns[i] -%}\n {%- if col['data_type'] is not defined -%}\n {{ col_err.append(col['name']) }}\n {%- endif -%}\n {% set col_name = adapter.quote(col['name']) if col.get('quote') else col['name'] %}\n cast(null as {{ 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 {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.870668, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.871068, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.871256, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.871823, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8721228, "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 }} add column {{ adapter.quote(tmp_column) }} {{ new_column_type }};\n update {{ relation }} set {{ adapter.quote(tmp_column) }} = {{ adapter.quote(column_name) }};\n alter table {{ relation }} drop column {{ adapter.quote(column_name) }} cascade;\n alter table {{ relation }} rename column {{ adapter.quote(tmp_column) }} to {{ adapter.quote(column_name) }}\n {% endcall %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.873162, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.873575, "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 }}\n\n {% for column in add_columns %}\n add column {{ column.name }} {{ column.data_type }}{{ ',' if not loop.last }}\n {% endfor %}{{ ',' if add_columns and remove_columns }}\n\n {% for column in remove_columns %}\n drop column {{ column.name }}{{ ',' if not loop.last }}\n {% endfor %}\n\n {%- endset -%}\n\n {% do run_query(sql) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.874629, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.876702, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.876904, "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 {%- 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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8779461, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.878614, "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 -%}\nconfig_dict = {{ config_dict }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.879402, "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\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}, "patch_path": null, "arguments": [], "created_at": 1698690620.880043, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.880217, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.880985, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.881419, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.881875, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.882449, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8829, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.883551, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.884129, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8850718, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.885406, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.885827, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.886914, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8879008, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.888705, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.889685, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.890306, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.89062, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8912792, "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 threshold = 'cast(' ~ dbt.dateadd(datepart, interval * -1, dbt.current_timestamp()) ~ ' as ' ~ ('date' if ignore_time_component else dbt.type_timestamp()) ~ ')' %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n\nwith recency as (\n\n select \n\n {{ select_gb_cols }}\n {% if ignore_time_component %}\n cast(max({{ field }}) as date) as most_recent\n {%- else %}\n max({{ field }}) as most_recent\n {%- endif %}\n\n from {{ model }}\n\n {{ groupby_gb_cols }}\n\n)\n\nselect\n\n {{ select_gb_cols }}\n most_recent,\n {{ threshold }} as threshold\n\nfrom recency\nwhere most_recent < {{ threshold }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.current_timestamp", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.892044, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.892467, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.892889, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.89345, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.893879, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.89437, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.894721, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.895604, "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 where {{ column_name }} is not null\n limit 1\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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8967109, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8973598, "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 {% set column_list = column_list.append( adapter.quote(column) ) %}\n {%- endfor %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`quote_columns` argument for unique_combination_of_columns test must be one of [True, False] Got: '\" ~ quote ~\"'.'\"\n ) }}\n{% endif %}\n\n{%- set columns_csv=column_list | join(', ') %}\n\n\nwith validation_errors as (\n\n select\n {{ columns_csv }}\n from {{ model }}\n group by {{ columns_csv }}\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.897982, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8985322, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.898856, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.8992362, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.899559, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.900144, "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 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": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.900872, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.901669, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.902472, "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) %}\n {{ return(adapter.dispatch('test_equality', 'dbt_utils')(model, compare_model, compare_columns)) }}\n{% endtest %}", "depends_on": {"macros": ["macro.dbt_utils.default__test_equality"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.903135, "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) %}\n\n{% set set_diff %}\n count(*) + coalesce(abs(\n sum(case when which_diff = 'a_minus_b' then 1 else 0 end) -\n sum(case when which_diff = 'b_minus_a' then 1 else 0 end)\n ), 0)\n{% endset %}\n\n{#-- Needs to be set at parse time, before we return '' below --#}\n{{ config(fail_calc = set_diff) }}\n\n{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\n{%- if not execute -%}\n {{ return('') }}\n{% endif %}\n\n-- setup\n{%- do dbt_utils._is_relation(model, 'test_equality') -%}\n\n{#-\nIf the compare_cols arg is provided, we can run this test without querying the\ninformation schema\u00a0\u2014 this allows the model to be an ephemeral model\n-#}\n\n{%- if not compare_columns -%}\n {%- do dbt_utils._is_ephemeral(model, 'test_equality') -%}\n {%- set compare_columns = adapter.get_columns_in_relation(model) | map(attribute='quoted') -%}\n{%- endif -%}\n\n{% set compare_cols_csv = compare_columns | join(', ') %}\n\nwith a as (\n\n select * from {{ model }}\n\n),\n\nb as (\n\n select * from {{ compare_model }}\n\n),\n\na_minus_b as (\n\n select {{compare_cols_csv}} from a\n {{ dbt.except() }}\n select {{compare_cols_csv}} from b\n\n),\n\nb_minus_a as (\n\n select {{compare_cols_csv}} from b\n {{ dbt.except() }}\n select {{compare_cols_csv}} from a\n\n),\n\nunioned as (\n\n select 'a_minus_b' as which_diff, a_minus_b.* from a_minus_b\n union all\n select 'b_minus_a' as which_diff, b_minus_a.* from b_minus_a\n\n)\n\nselect * from unioned\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.except"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.90391, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.904356, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.9046242, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.90765, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.909081, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.909328, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.909476, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.909872, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.91012, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.910293, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.910521, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.910672, "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{#- 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}, "patch_path": null, "arguments": [], "created_at": 1698690620.91122, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.91195, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.912571, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.913093, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.913295, "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 1) - 1\",\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n\n),\n\nfiltered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n)\n\nselect * from filtered\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.generate_series", "macro.dbt_utils.get_intervals_between", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.913622, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.9139671, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.91445, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.9147341, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.915033, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.916236, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.917554, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.9186502, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.919117, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.919307, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.9197812, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.9204009, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.921175, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.921547, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.92181, "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) -%}\r\n {{ return(adapter.dispatch('star', 'dbt_utils')(from, relation_alias, except, prefix, suffix, quote_identifiers)) }}\r\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__star"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.9228952, "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) -%}\r\n {%- do dbt_utils._is_relation(from, 'star') -%}\r\n {%- do dbt_utils._is_ephemeral(from, 'star') -%}\r\n\r\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\r\n {%- if not execute -%}\r\n {% do return('*') %}\r\n {%- endif -%}\r\n\r\n {% set cols = dbt_utils.get_filtered_columns_in_relation(from, except) %}\r\n\r\n {%- if cols|length <= 0 -%}\r\n {% if flags.WHICH == 'compile' %}\r\n {% set response %}\r\n*\r\n/* No columns were returned. Maybe the relation doesn't exist yet \r\nor all columns were excluded. This star is only output during \r\ndbt compile, and exists to keep SQLFluff happy. */\r\n {% endset %}\r\n {% do return(response) %}\r\n {% else %}\r\n {% do return(\"/* no columns returned from star() macro */\") %}\r\n {% endif %}\r\n {%- else -%}\r\n {%- for col in cols %}\r\n {%- if relation_alias %}{{ relation_alias }}.{% else %}{%- endif -%}\r\n {%- if quote_identifiers -%}\r\n {{ adapter.quote(col)|trim }} {%- if prefix!='' or suffix!='' %} as {{ adapter.quote(prefix ~ col ~ suffix)|trim }} {%- endif -%}\r\n {%- else -%}\r\n {{ col|trim }} {%- if prefix!='' or suffix!='' %} as {{ (prefix ~ col ~ suffix)|trim }} {%- endif -%}\r\n {% endif %}\r\n {%- if not loop.last %},{{ '\\n ' }}{%- endif -%}\r\n {%- endfor -%}\r\n {% endif %}\r\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.924222, "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') -%}\n {{ return(adapter.dispatch('unpivot', 'dbt_utils')(relation, cast_to, exclude, remove, field_name, value_name)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__unpivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.925382, "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') -%}\n\n {% if not relation %}\n {{ exceptions.raise_compiler_error(\"Error: argument `relation` is required for `unpivot` macro.\") }}\n {% endif %}\n\n {%- set exclude = exclude if exclude is not none else [] %}\n {%- set remove = remove if remove is not none else [] %}\n\n {%- set include_cols = [] %}\n\n {%- set table_columns = {} %}\n\n {%- do table_columns.update({relation: []}) %}\n\n {%- do dbt_utils._is_relation(relation, 'unpivot') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'unpivot') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) %}\n\n {%- for col in cols -%}\n {%- if col.column.lower() not in remove|map('lower') and col.column.lower() not in exclude|map('lower') -%}\n {% do include_cols.append(col) %}\n {%- endif %}\n {%- endfor %}\n\n\n {%- for col in include_cols -%}\n select\n {%- for exclude_col in exclude %}\n {{ exclude_col }},\n {%- endfor %}\n\n cast('{{ col.column }}' as {{ dbt.type_string() }}) as {{ field_name }},\n cast( {% if col.data_type == 'boolean' %}\n {{ dbt.cast_bool_to_text(col.column) }}\n {% else %}\n {{ col.column }}\n {% endif %}\n as {{ cast_to }}) as {{ value_name }}\n\n from {{ relation }}\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n {%- endfor -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.type_string", "macro.dbt.cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.926848, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.927117, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.92724, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.929921, "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) }} as {{ dbt.type_string() }}) as {{ source_column_name }},\n {%- endif %}\n\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n\n from {{ relation }}\n\n {% if where -%}\n where {{ where }}\n {%- endif %}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.933022, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.9332962, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.933523, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.934218, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.934413, "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 {{ return(dbt_utils.default__deduplicate(relation, partition_by, order_by=order_by)) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__deduplicate"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690620.934591, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.934763, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.934911, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.9350688, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.9354188, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.935637, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.936359, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.937221, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.937579, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.9378948, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.9393668, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.9396951, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.940626, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.941083, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.942058, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.943414, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.944352, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.9450939, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.945507, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.946508, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.947906, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.948548, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.9487581, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.949167, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.949735, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.950179, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.9507682, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.9512289, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.951355, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.951481, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.951607, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.9520588, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.97808, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.9796522, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.9800498, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.981826, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.982767, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.989553, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.990486, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.991366, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.992071, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.992778, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.993783, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.994005, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.994118, "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}, "patch_path": null, "arguments": [], "created_at": 1698690620.99667, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.003192, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0033221, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.003389, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.004435, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0063949, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.007033, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.007484, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0077739, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0080829, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.008266, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.008451, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0088162, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0096462, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.009797, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.00994, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.010081, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.01021, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0103538, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0111418, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.011724, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.012688, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.012907, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.01313, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.013345, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.013557, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.013793, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.014188, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.014512, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.014611, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.014703, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.014795, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.015136, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.015759, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.016732, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0172522, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.01794, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0183702, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.018487, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.018604, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.018721, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.018841, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0213969, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.021546, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0216892, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0218282, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.023412, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.024183, "supported_languages": null}, "macro.fivetran_utils.default__safe_cast": {"name": "default__safe_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__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}, "patch_path": null, "arguments": [], "created_at": 1698690621.02431, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.024553, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.024809, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.024927, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0250392, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.025148, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.025594, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0261068, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0265548, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.026738, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.026939, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.02717, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.028202, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.03171, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0320399, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.032376, "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\n{%- for column in staging_columns %}\n {% if column.name|lower in source_column_names -%}\n {{ fivetran_utils.quote_column(column) }} as \n {%- if 'alias' in column %} {{ column.alias }} {% else %} {{ fivetran_utils.quote_column(column) }} {%- endif -%}\n {%- else -%}\n cast(null as {{ column.datatype }})\n {%- if 'alias' in column %} as {{ column.alias }} {% else %} as {{ fivetran_utils.quote_column(column) }} {% endif -%}\n {%- endif -%}\n {%- if not loop.last -%} , {% endif -%}\n{% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.quote_column"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690621.033729, "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 %}\n {{ column.name }}\n {% endif %}\n {% else %}\n {{ column.name }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690621.034255, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0347662, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0349052, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0350468, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.035199, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0353322, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.035467, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.036093, "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 {{ return(load_result('collect_freshness').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690621.0369668, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.037587, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.037737, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.037879, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.038023, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.038166, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.038385, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.038613, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0387042, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.038792, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.039357, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.042445, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.048689, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.050807, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0512042, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.051313, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0514162, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.05151, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.051602, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.0518441, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.051937, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.052028, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.052397, "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}, "patch_path": null, "arguments": [], "created_at": 1698690621.052761, "supported_languages": null}, "macro.salesforce_source.get_contact_columns": {"name": "get_contact_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_contact_columns.sql", "original_file_path": "macros/get_contact_columns.sql", "unique_id": "macro.salesforce_source.get_contact_columns", "macro_sql": "{% macro get_contact_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"department\", \"datatype\": dbt.type_string()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"email\", \"datatype\": dbt.type_string()},\n {\"name\": \"first_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"home_phone\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"individual_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"last_activity_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_modified_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_modified_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_referenced_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_viewed_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"lead_source\", \"datatype\": dbt.type_string()},\n {\"name\": \"mailing_city\", \"datatype\": dbt.type_string()},\n {\"name\": \"mailing_country\", \"datatype\": dbt.type_string()},\n {\"name\": \"mailing_country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"mailing_postal_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"mailing_state\", \"datatype\": dbt.type_string()},\n {\"name\": \"mailing_state_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"mailing_street\", \"datatype\": dbt.type_string()},\n {\"name\": \"master_record_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"mobile_phone\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"owner_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"phone\", \"datatype\": dbt.type_string()},\n {\"name\": \"reports_to_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"title\", \"datatype\": dbt.type_string()},\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__contact_pass_through_columns')) }} \n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690621.057429, "supported_languages": null}, "macro.salesforce_source.get_account_columns": {"name": "get_account_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_account_columns.sql", "original_file_path": "macros/get_account_columns.sql", "unique_id": "macro.salesforce_source.get_account_columns", "macro_sql": "{% macro get_account_columns() %}\n\n{% set columns = [\n\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"account_number\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_source\", \"datatype\": dbt.type_string()},\n {\"name\": \"annual_revenue\", \"datatype\": dbt.type_float()},\n {\"name\": \"billing_city\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_country\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_postal_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_state\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_state_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_street\", \"datatype\": dbt.type_string()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"industry\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"last_activity_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_referenced_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_viewed_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"master_record_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"number_of_employees\", \"datatype\": dbt.type_int()},\n {\"name\": \"owner_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ownership\", \"datatype\": dbt.type_string()},\n {\"name\": \"parent_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"rating\", \"datatype\": dbt.type_string()},\n {\"name\": \"record_type_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_city\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_country\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_postal_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_state\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_state_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_street\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"website\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__account_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_float", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690621.062502, "supported_languages": null}, "macro.salesforce_source.get_task_columns": {"name": "get_task_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_task_columns.sql", "original_file_path": "macros/get_task_columns.sql", "unique_id": "macro.salesforce_source.get_task_columns", "macro_sql": "{% macro get_task_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"activity_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"call_disposition\", \"datatype\": dbt.type_string()},\n {\"name\": \"call_duration_in_seconds\", \"datatype\": dbt.type_int()},\n {\"name\": \"call_object\", \"datatype\": dbt.type_string()},\n {\"name\": \"call_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"completed_date_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_archived\", \"datatype\": \"boolean\"},\n {\"name\": \"is_closed\", \"datatype\": \"boolean\"},\n {\"name\": \"is_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"is_high_priority\", \"datatype\": \"boolean\"},\n {\"name\": \"last_modified_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_modified_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"owner_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"priority\", \"datatype\": dbt.type_string()},\n {\"name\": \"record_type_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"subject\", \"datatype\": dbt.type_string()},\n {\"name\": \"task_subtype\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"what_count\", \"datatype\": dbt.type_int()},\n {\"name\": \"what_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"who_count\", \"datatype\": dbt.type_int()},\n {\"name\": \"who_id\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__task_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690621.065851, "supported_languages": null}, "macro.salesforce_source.get_user_role_columns": {"name": "get_user_role_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_user_role_columns.sql", "original_file_path": "macros/get_user_role_columns.sql", "unique_id": "macro.salesforce_source.get_user_role_columns", "macro_sql": "{% macro get_user_role_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"developer_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"opportunity_access_for_account_owner\", \"datatype\": dbt.type_string()},\n {\"name\": \"parent_role_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"rollup_description\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__user_role_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690621.067468, "supported_languages": null}, "macro.salesforce_source.get_order_columns": {"name": "get_order_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_order_columns.sql", "original_file_path": "macros/get_order_columns.sql", "unique_id": "macro.salesforce_source.get_order_columns", "macro_sql": "{% macro get_order_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"activated_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"activated_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"billing_city\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_country\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_postal_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_state\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_state_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_street\", \"datatype\": dbt.type_string()},\n {\"name\": \"contract_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"end_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"last_modified_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_modified_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_referenced_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_viewed_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"opportunity_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"order_number\", \"datatype\": dbt.type_string()},\n {\"name\": \"original_order_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"owner_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"pricebook_2_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_city\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_country\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_postal_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_state\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_state_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_street\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"total_amount\", \"datatype\": dbt.type_float()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__order_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_float", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690621.073707, "supported_languages": null}, "macro.salesforce_source.get_user_columns": {"name": "get_user_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_user_columns.sql", "original_file_path": "macros/get_user_columns.sql", "unique_id": "macro.salesforce_source.get_user_columns", "macro_sql": "{% macro get_user_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"alias\", \"datatype\": dbt.type_string()},\n {\"name\": \"city\", \"datatype\": dbt.type_string()},\n {\"name\": \"company_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"contact_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"country\", \"datatype\": dbt.type_string()},\n {\"name\": \"country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"department\", \"datatype\": dbt.type_string()},\n {\"name\": \"email\", \"datatype\": dbt.type_string()},\n {\"name\": \"first_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"individual_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_active\", \"datatype\": \"boolean\"},\n {\"name\": \"last_login_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_referenced_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_viewed_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"manager_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"postal_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"profile_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"state\", \"datatype\": dbt.type_string()},\n {\"name\": \"state_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"street\", \"datatype\": dbt.type_string()},\n {\"name\": \"title\", \"datatype\": dbt.type_string()},\n {\"name\": \"user_role_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"user_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"username\", \"datatype\": dbt.type_string()},\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__user_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690621.077227, "supported_languages": null}, "macro.salesforce_source.get_product_2_columns": {"name": "get_product_2_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_product_2_columns.sql", "original_file_path": "macros/get_product_2_columns.sql", "unique_id": "macro.salesforce_source.get_product_2_columns", "macro_sql": "{% macro get_product_2_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"created_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"display_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"external_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"family\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_active\", \"datatype\": \"boolean\"},\n {\"name\": \"is_archived\", \"datatype\": \"boolean\"},\n {\"name\": \"is_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"last_modified_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_modified_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_referenced_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_viewed_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"number_of_quantity_installments\", \"datatype\": dbt.type_int()},\n {\"name\": \"number_of_revenue_installments\", \"datatype\": dbt.type_int()},\n {\"name\": \"product_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"quantity_installment_period\", \"datatype\": dbt.type_string()},\n {\"name\": \"quantity_schedule_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"quantity_unit_of_measure\", \"datatype\": dbt.type_string()},\n {\"name\": \"record_type_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"revenue_installment_period\", \"datatype\": dbt.type_string()},\n {\"name\": \"revenue_schedule_type\", \"datatype\": dbt.type_string()},\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__product_2_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690621.080087, "supported_languages": null}, "macro.salesforce_source.get_opportunity_columns": {"name": "get_opportunity_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_opportunity_columns.sql", "original_file_path": "macros/get_opportunity_columns.sql", "unique_id": "macro.salesforce_source.get_opportunity_columns", "macro_sql": "{% macro get_opportunity_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"amount\", \"datatype\": dbt.type_float()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"close_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"expected_revenue\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"fiscal\", \"datatype\": dbt.type_string()},\n {\"name\": \"fiscal_quarter\", \"datatype\": dbt.type_int()},\n {\"name\": \"fiscal_year\", \"datatype\": dbt.type_int()},\n {\"name\": \"forecast_category\", \"datatype\": dbt.type_string()},\n {\"name\": \"forecast_category_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"has_open_activity\", \"datatype\": \"boolean\"},\n {\"name\": \"has_opportunity_line_item\", \"datatype\": \"boolean\"},\n {\"name\": \"has_overdue_task\", \"datatype\": \"boolean\"},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_closed\", \"datatype\": \"boolean\"},\n {\"name\": \"is_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"is_won\", \"datatype\": \"boolean\"},\n {\"name\": \"last_activity_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_referenced_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_viewed_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"lead_source\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"next_step\", \"datatype\": dbt.type_string()},\n {\"name\": \"owner_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"probability\", \"datatype\": dbt.type_float()},\n {\"name\": \"record_type_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"stage_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"synced_quote_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__opportunity_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_float", "macro.dbt.type_numeric", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690621.0837991, "supported_languages": null}, "macro.salesforce_source.get_event_columns": {"name": "get_event_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_event_columns.sql", "original_file_path": "macros/get_event_columns.sql", "unique_id": "macro.salesforce_source.get_event_columns", "macro_sql": "{% macro get_event_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"activity_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"activity_date_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"end_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"end_date_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"event_subtype\", \"datatype\": dbt.type_string()},\n {\"name\": \"group_event_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_archived\", \"datatype\": \"boolean\"},\n {\"name\": \"is_child\", \"datatype\": \"boolean\"},\n {\"name\": \"is_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"is_group_event\", \"datatype\": \"boolean\"},\n {\"name\": \"is_recurrence\", \"datatype\": \"boolean\"},\n {\"name\": \"last_modified_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_modified_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"location\", \"datatype\": dbt.type_string()},\n {\"name\": \"owner_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"start_date_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"subject\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"what_count\", \"datatype\": dbt.type_int()},\n {\"name\": \"what_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"who_count\", \"datatype\": dbt.type_int()},\n {\"name\": \"who_id\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__event_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690621.087368, "supported_languages": null}, "macro.salesforce_source.get_lead_columns": {"name": "get_lead_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_lead_columns.sql", "original_file_path": "macros/get_lead_columns.sql", "unique_id": "macro.salesforce_source.get_lead_columns", "macro_sql": "{% macro get_lead_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"annual_revenue\", \"datatype\": dbt.type_float()},\n {\"name\": \"city\", \"datatype\": dbt.type_string()},\n {\"name\": \"company\", \"datatype\": dbt.type_string()},\n {\"name\": \"converted_account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"converted_contact_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"converted_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"converted_opportunity_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"country\", \"datatype\": dbt.type_string()},\n {\"name\": \"country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"email\", \"datatype\": dbt.type_string()},\n {\"name\": \"email_bounced_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"email_bounced_reason\", \"datatype\": dbt.type_string()},\n {\"name\": \"first_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"has_opted_out_of_email\", \"datatype\": \"boolean\"},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"individual_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"industry\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_converted\", \"datatype\": \"boolean\"},\n {\"name\": \"is_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"is_unread_by_owner\", \"datatype\": \"boolean\"},\n {\"name\": \"last_activity_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_modified_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_modified_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_referenced_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_viewed_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"lead_source\", \"datatype\": dbt.type_string()},\n {\"name\": \"master_record_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"mobile_phone\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"number_of_employees\", \"datatype\": dbt.type_int()},\n {\"name\": \"owner_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"phone\", \"datatype\": dbt.type_string()},\n {\"name\": \"postal_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"state\", \"datatype\": dbt.type_string()},\n {\"name\": \"state_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"street\", \"datatype\": dbt.type_string()},\n {\"name\": \"title\", \"datatype\": dbt.type_string()},\n {\"name\": \"website\", \"datatype\": dbt.type_string()},\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__lead_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_float", "macro.dbt.type_string", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690621.095505, "supported_languages": null}, "macro.salesforce_source.get_opportunity_line_item_columns": {"name": "get_opportunity_line_item_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_opportunity_line_item_columns.sql", "original_file_path": "macros/get_opportunity_line_item_columns.sql", "unique_id": "macro.salesforce_source.get_opportunity_line_item_columns", "macro_sql": "{% macro get_opportunity_line_item_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"created_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"discount\", \"datatype\": dbt.type_float()},\n {\"name\": \"has_quantity_schedule\", \"datatype\": \"boolean\"},\n {\"name\": \"has_revenue_schedule\", \"datatype\": \"boolean\"},\n {\"name\": \"has_schedule\", \"datatype\": \"boolean\"},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"last_modified_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_modified_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_referenced_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_viewed_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"list_price\", \"datatype\": dbt.type_float()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"opportunity_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"pricebook_entry_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"product_2_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"product_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"quantity\", \"datatype\": dbt.type_float()},\n {\"name\": \"service_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"sort_order\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_price\", \"datatype\": dbt.type_float()},\n {\"name\": \"unit_price\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__opportunity_line_item_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_float", "macro.dbt.type_int", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1698690621.098298, "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"}}, "exposures": {}, "metrics": {}, "groups": {}, "selectors": {}, "disabled": {}, "parent_map": {"seed.salesforce_source_integration_tests.sf_lead_data": [], "seed.salesforce_source_integration_tests.sf_product_2_data": [], "seed.salesforce_source_integration_tests.sf_user_role_data": [], "seed.salesforce_source_integration_tests.sf_account_data": [], "seed.salesforce_source_integration_tests.sf_opportunity_line_item_data": [], "seed.salesforce_source_integration_tests.sf_user_data": [], "seed.salesforce_source_integration_tests.sf_contact_data": [], "seed.salesforce_source_integration_tests.sf_opportunity_data": [], "seed.salesforce_source_integration_tests.sf_opportunity_history_data": [], "seed.salesforce_source_integration_tests.sf_order_data": [], "seed.salesforce_source_integration_tests.sf_event_data": [], "seed.salesforce_source_integration_tests.sf_contact_history_data": [], "seed.salesforce_source_integration_tests.sf_account_history_data": [], "seed.salesforce_source_integration_tests.sf_task_data": [], "model.salesforce_source.stg_salesforce__opportunity_history": ["source.salesforce_source.salesforce_history.opportunity"], "model.salesforce_source.stg_salesforce__account_history": ["source.salesforce_source.salesforce_history.account"], "model.salesforce_source.stg_salesforce__contact_history": ["source.salesforce_source.salesforce_history.contact"], "model.salesforce_source.stg_salesforce__opportunity": ["source.salesforce_source.salesforce.opportunity"], "model.salesforce_source.stg_salesforce__user_role": ["source.salesforce_source.salesforce.user_role"], "model.salesforce_source.stg_salesforce__contact": ["source.salesforce_source.salesforce.contact"], "model.salesforce_source.stg_salesforce__account": ["source.salesforce_source.salesforce.account"], "model.salesforce_source.stg_salesforce__lead": ["source.salesforce_source.salesforce.lead"], "model.salesforce_source.stg_salesforce__order": ["source.salesforce_source.salesforce.order"], "model.salesforce_source.stg_salesforce__event": ["source.salesforce_source.salesforce.event"], "model.salesforce_source.stg_salesforce__product_2": ["source.salesforce_source.salesforce.product_2"], "model.salesforce_source.stg_salesforce__opportunity_line_item": ["source.salesforce_source.salesforce.opportunity_line_item"], "model.salesforce_source.stg_salesforce__user": ["source.salesforce_source.salesforce.user"], "model.salesforce_source.stg_salesforce__task": ["source.salesforce_source.salesforce.task"], "test.salesforce_source.not_null_stg_salesforce__account_history_history_unique_key.e946c6dd0e": ["model.salesforce_source.stg_salesforce__account_history"], "test.salesforce_source.unique_stg_salesforce__account_history_history_unique_key.c378da769f": ["model.salesforce_source.stg_salesforce__account_history"], "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__account_history_account_id___fivetran_start___fivetran_end.7db755dfc6": ["model.salesforce_source.stg_salesforce__account_history"], "test.salesforce_source.not_null_stg_salesforce__contact_history_history_unique_key.673cb181cf": ["model.salesforce_source.stg_salesforce__contact_history"], "test.salesforce_source.unique_stg_salesforce__contact_history_history_unique_key.215181e10d": ["model.salesforce_source.stg_salesforce__contact_history"], "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__contact_history_contact_id___fivetran_start___fivetran_end.2d7ff092ee": ["model.salesforce_source.stg_salesforce__contact_history"], "test.salesforce_source.not_null_stg_salesforce__opportunity_history_history_unique_key.32fa6270e0": ["model.salesforce_source.stg_salesforce__opportunity_history"], "test.salesforce_source.unique_stg_salesforce__opportunity_history_history_unique_key.b5b08bda67": ["model.salesforce_source.stg_salesforce__opportunity_history"], "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__opportunity_history_opportunity_id___fivetran_start___fivetran_end.1209811435": ["model.salesforce_source.stg_salesforce__opportunity_history"], "test.salesforce_source.not_null_stg_salesforce__account_account_id.1e0ff361d4": ["model.salesforce_source.stg_salesforce__account"], "test.salesforce_source.unique_stg_salesforce__account_account_id.6d58a39ba7": ["model.salesforce_source.stg_salesforce__account"], "test.salesforce_source.not_null_stg_salesforce__opportunity_opportunity_id.234c5e60bd": ["model.salesforce_source.stg_salesforce__opportunity"], "test.salesforce_source.unique_stg_salesforce__opportunity_opportunity_id.367b0f577a": ["model.salesforce_source.stg_salesforce__opportunity"], "test.salesforce_source.not_null_stg_salesforce__user_user_id.ac0ab26d65": ["model.salesforce_source.stg_salesforce__user"], "test.salesforce_source.unique_stg_salesforce__user_user_id.9a29b41152": ["model.salesforce_source.stg_salesforce__user"], "test.salesforce_source.not_null_stg_salesforce__user_role_user_role_id.949036e9bd": ["model.salesforce_source.stg_salesforce__user_role"], "test.salesforce_source.unique_stg_salesforce__user_role_user_role_id.1259050718": ["model.salesforce_source.stg_salesforce__user_role"], "test.salesforce_source.not_null_stg_salesforce__contact_contact_id.d7c02bef78": ["model.salesforce_source.stg_salesforce__contact"], "test.salesforce_source.unique_stg_salesforce__contact_contact_id.0cc2c0609e": ["model.salesforce_source.stg_salesforce__contact"], "test.salesforce_source.not_null_stg_salesforce__event_event_id.e964b30db8": ["model.salesforce_source.stg_salesforce__event"], "test.salesforce_source.unique_stg_salesforce__event_event_id.13f7c8c0d9": ["model.salesforce_source.stg_salesforce__event"], "test.salesforce_source.not_null_stg_salesforce__lead_lead_id.e2ba6b2026": ["model.salesforce_source.stg_salesforce__lead"], "test.salesforce_source.unique_stg_salesforce__lead_lead_id.ba8b21e282": ["model.salesforce_source.stg_salesforce__lead"], "test.salesforce_source.not_null_stg_salesforce__opportunity_line_item_opportunity_line_item_id.b5d2465072": ["model.salesforce_source.stg_salesforce__opportunity_line_item"], "test.salesforce_source.unique_stg_salesforce__opportunity_line_item_opportunity_line_item_id.c18042d902": ["model.salesforce_source.stg_salesforce__opportunity_line_item"], "test.salesforce_source.not_null_stg_salesforce__order_order_id.4782f3b34f": ["model.salesforce_source.stg_salesforce__order"], "test.salesforce_source.unique_stg_salesforce__order_order_id.12a96b4e3c": ["model.salesforce_source.stg_salesforce__order"], "test.salesforce_source.not_null_stg_salesforce__product_2_product_2_id.84aed29e8a": ["model.salesforce_source.stg_salesforce__product_2"], "test.salesforce_source.unique_stg_salesforce__product_2_product_2_id.b4bc489d61": ["model.salesforce_source.stg_salesforce__product_2"], "test.salesforce_source.not_null_stg_salesforce__task_task_id.aabe11a5d9": ["model.salesforce_source.stg_salesforce__task"], "test.salesforce_source.unique_stg_salesforce__task_task_id.73684ed605": ["model.salesforce_source.stg_salesforce__task"], "source.salesforce_source.salesforce_history.account": [], "source.salesforce_source.salesforce_history.contact": [], "source.salesforce_source.salesforce_history.opportunity": [], "source.salesforce_source.salesforce.account": [], "source.salesforce_source.salesforce.opportunity": [], "source.salesforce_source.salesforce.user": [], "source.salesforce_source.salesforce.user_role": [], "source.salesforce_source.salesforce.contact": [], "source.salesforce_source.salesforce.event": [], "source.salesforce_source.salesforce.lead": [], "source.salesforce_source.salesforce.opportunity_line_item": [], "source.salesforce_source.salesforce.order": [], "source.salesforce_source.salesforce.product_2": [], "source.salesforce_source.salesforce.task": [], "source.salesforce_source.salesforce.fivetran_formula": [], "source.salesforce_source.salesforce.fivetran_formula_model": []}, "child_map": {"seed.salesforce_source_integration_tests.sf_lead_data": [], "seed.salesforce_source_integration_tests.sf_product_2_data": [], "seed.salesforce_source_integration_tests.sf_user_role_data": [], "seed.salesforce_source_integration_tests.sf_account_data": [], "seed.salesforce_source_integration_tests.sf_opportunity_line_item_data": [], "seed.salesforce_source_integration_tests.sf_user_data": [], "seed.salesforce_source_integration_tests.sf_contact_data": [], "seed.salesforce_source_integration_tests.sf_opportunity_data": [], "seed.salesforce_source_integration_tests.sf_opportunity_history_data": [], "seed.salesforce_source_integration_tests.sf_order_data": [], "seed.salesforce_source_integration_tests.sf_event_data": [], "seed.salesforce_source_integration_tests.sf_contact_history_data": [], "seed.salesforce_source_integration_tests.sf_account_history_data": [], "seed.salesforce_source_integration_tests.sf_task_data": [], "model.salesforce_source.stg_salesforce__opportunity_history": ["test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__opportunity_history_opportunity_id___fivetran_start___fivetran_end.1209811435", "test.salesforce_source.not_null_stg_salesforce__opportunity_history_history_unique_key.32fa6270e0", "test.salesforce_source.unique_stg_salesforce__opportunity_history_history_unique_key.b5b08bda67"], "model.salesforce_source.stg_salesforce__account_history": ["test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__account_history_account_id___fivetran_start___fivetran_end.7db755dfc6", "test.salesforce_source.not_null_stg_salesforce__account_history_history_unique_key.e946c6dd0e", "test.salesforce_source.unique_stg_salesforce__account_history_history_unique_key.c378da769f"], "model.salesforce_source.stg_salesforce__contact_history": ["test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__contact_history_contact_id___fivetran_start___fivetran_end.2d7ff092ee", "test.salesforce_source.not_null_stg_salesforce__contact_history_history_unique_key.673cb181cf", "test.salesforce_source.unique_stg_salesforce__contact_history_history_unique_key.215181e10d"], "model.salesforce_source.stg_salesforce__opportunity": ["test.salesforce_source.not_null_stg_salesforce__opportunity_opportunity_id.234c5e60bd", "test.salesforce_source.unique_stg_salesforce__opportunity_opportunity_id.367b0f577a"], "model.salesforce_source.stg_salesforce__user_role": ["test.salesforce_source.not_null_stg_salesforce__user_role_user_role_id.949036e9bd", "test.salesforce_source.unique_stg_salesforce__user_role_user_role_id.1259050718"], "model.salesforce_source.stg_salesforce__contact": ["test.salesforce_source.not_null_stg_salesforce__contact_contact_id.d7c02bef78", "test.salesforce_source.unique_stg_salesforce__contact_contact_id.0cc2c0609e"], "model.salesforce_source.stg_salesforce__account": ["test.salesforce_source.not_null_stg_salesforce__account_account_id.1e0ff361d4", "test.salesforce_source.unique_stg_salesforce__account_account_id.6d58a39ba7"], "model.salesforce_source.stg_salesforce__lead": ["test.salesforce_source.not_null_stg_salesforce__lead_lead_id.e2ba6b2026", "test.salesforce_source.unique_stg_salesforce__lead_lead_id.ba8b21e282"], "model.salesforce_source.stg_salesforce__order": ["test.salesforce_source.not_null_stg_salesforce__order_order_id.4782f3b34f", "test.salesforce_source.unique_stg_salesforce__order_order_id.12a96b4e3c"], "model.salesforce_source.stg_salesforce__event": ["test.salesforce_source.not_null_stg_salesforce__event_event_id.e964b30db8", "test.salesforce_source.unique_stg_salesforce__event_event_id.13f7c8c0d9"], "model.salesforce_source.stg_salesforce__product_2": ["test.salesforce_source.not_null_stg_salesforce__product_2_product_2_id.84aed29e8a", "test.salesforce_source.unique_stg_salesforce__product_2_product_2_id.b4bc489d61"], "model.salesforce_source.stg_salesforce__opportunity_line_item": ["test.salesforce_source.not_null_stg_salesforce__opportunity_line_item_opportunity_line_item_id.b5d2465072", "test.salesforce_source.unique_stg_salesforce__opportunity_line_item_opportunity_line_item_id.c18042d902"], "model.salesforce_source.stg_salesforce__user": ["test.salesforce_source.not_null_stg_salesforce__user_user_id.ac0ab26d65", "test.salesforce_source.unique_stg_salesforce__user_user_id.9a29b41152"], "model.salesforce_source.stg_salesforce__task": ["test.salesforce_source.not_null_stg_salesforce__task_task_id.aabe11a5d9", "test.salesforce_source.unique_stg_salesforce__task_task_id.73684ed605"], "test.salesforce_source.not_null_stg_salesforce__account_history_history_unique_key.e946c6dd0e": [], "test.salesforce_source.unique_stg_salesforce__account_history_history_unique_key.c378da769f": [], "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__account_history_account_id___fivetran_start___fivetran_end.7db755dfc6": [], "test.salesforce_source.not_null_stg_salesforce__contact_history_history_unique_key.673cb181cf": [], "test.salesforce_source.unique_stg_salesforce__contact_history_history_unique_key.215181e10d": [], "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__contact_history_contact_id___fivetran_start___fivetran_end.2d7ff092ee": [], "test.salesforce_source.not_null_stg_salesforce__opportunity_history_history_unique_key.32fa6270e0": [], "test.salesforce_source.unique_stg_salesforce__opportunity_history_history_unique_key.b5b08bda67": [], "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__opportunity_history_opportunity_id___fivetran_start___fivetran_end.1209811435": [], "test.salesforce_source.not_null_stg_salesforce__account_account_id.1e0ff361d4": [], "test.salesforce_source.unique_stg_salesforce__account_account_id.6d58a39ba7": [], "test.salesforce_source.not_null_stg_salesforce__opportunity_opportunity_id.234c5e60bd": [], "test.salesforce_source.unique_stg_salesforce__opportunity_opportunity_id.367b0f577a": [], "test.salesforce_source.not_null_stg_salesforce__user_user_id.ac0ab26d65": [], "test.salesforce_source.unique_stg_salesforce__user_user_id.9a29b41152": [], "test.salesforce_source.not_null_stg_salesforce__user_role_user_role_id.949036e9bd": [], "test.salesforce_source.unique_stg_salesforce__user_role_user_role_id.1259050718": [], "test.salesforce_source.not_null_stg_salesforce__contact_contact_id.d7c02bef78": [], "test.salesforce_source.unique_stg_salesforce__contact_contact_id.0cc2c0609e": [], "test.salesforce_source.not_null_stg_salesforce__event_event_id.e964b30db8": [], "test.salesforce_source.unique_stg_salesforce__event_event_id.13f7c8c0d9": [], "test.salesforce_source.not_null_stg_salesforce__lead_lead_id.e2ba6b2026": [], "test.salesforce_source.unique_stg_salesforce__lead_lead_id.ba8b21e282": [], "test.salesforce_source.not_null_stg_salesforce__opportunity_line_item_opportunity_line_item_id.b5d2465072": [], "test.salesforce_source.unique_stg_salesforce__opportunity_line_item_opportunity_line_item_id.c18042d902": [], "test.salesforce_source.not_null_stg_salesforce__order_order_id.4782f3b34f": [], "test.salesforce_source.unique_stg_salesforce__order_order_id.12a96b4e3c": [], "test.salesforce_source.not_null_stg_salesforce__product_2_product_2_id.84aed29e8a": [], "test.salesforce_source.unique_stg_salesforce__product_2_product_2_id.b4bc489d61": [], "test.salesforce_source.not_null_stg_salesforce__task_task_id.aabe11a5d9": [], "test.salesforce_source.unique_stg_salesforce__task_task_id.73684ed605": [], "source.salesforce_source.salesforce_history.account": ["model.salesforce_source.stg_salesforce__account_history"], "source.salesforce_source.salesforce_history.contact": ["model.salesforce_source.stg_salesforce__contact_history"], "source.salesforce_source.salesforce_history.opportunity": ["model.salesforce_source.stg_salesforce__opportunity_history"], "source.salesforce_source.salesforce.account": ["model.salesforce_source.stg_salesforce__account"], "source.salesforce_source.salesforce.opportunity": ["model.salesforce_source.stg_salesforce__opportunity"], "source.salesforce_source.salesforce.user": ["model.salesforce_source.stg_salesforce__user"], "source.salesforce_source.salesforce.user_role": ["model.salesforce_source.stg_salesforce__user_role"], "source.salesforce_source.salesforce.contact": ["model.salesforce_source.stg_salesforce__contact"], "source.salesforce_source.salesforce.event": ["model.salesforce_source.stg_salesforce__event"], "source.salesforce_source.salesforce.lead": ["model.salesforce_source.stg_salesforce__lead"], "source.salesforce_source.salesforce.opportunity_line_item": ["model.salesforce_source.stg_salesforce__opportunity_line_item"], "source.salesforce_source.salesforce.order": ["model.salesforce_source.stg_salesforce__order"], "source.salesforce_source.salesforce.product_2": ["model.salesforce_source.stg_salesforce__product_2"], "source.salesforce_source.salesforce.task": ["model.salesforce_source.stg_salesforce__task"], "source.salesforce_source.salesforce.fivetran_formula": [], "source.salesforce_source.salesforce.fivetran_formula_model": []}, "group_map": {}, "semantic_models": {}} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v12.json", "dbt_version": "1.8.3", "generated_at": "2024-07-10T01:17:24.678270Z", "invocation_id": "5cb841b5-e5cf-490f-8f23-4c9cf5d27c80", "env": {}, "project_name": "salesforce_source_integration_tests", "project_id": "263106cda4237bb52d7987f1581d49bb", "user_id": "8268eefe-e8f7-472e-ab2a-a92f0135d76d", "send_anonymous_usage_stats": true, "adapter_type": "postgres"}, "nodes": {"seed.salesforce_source_integration_tests.sf_lead_data": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "sf_lead_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_lead_data.csv", "original_file_path": "seeds/sf_lead_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_lead_data", "fqn": ["salesforce_source_integration_tests", "sf_lead_data"], "alias": "sf_lead_data", "checksum": {"name": "sha256", "checksum": "83b59332e93f8f07839e1e573c09a9591084734387efc8783e3f51058ff5034b"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "converted_date": "timestamp", "created_date": "timestamp", "email_bounced_date": "timestamp", "last_activity_date": "timestamp", "last_modified_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": true}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"converted_date": "timestamp", "created_date": "timestamp", "email_bounced_date": "timestamp", "last_activity_date": "timestamp", "last_modified_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}}, "created_at": 1720574245.724844, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_lead_data\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_product_2_data": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "sf_product_2_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_product_2_data.csv", "original_file_path": "seeds/sf_product_2_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_product_2_data", "fqn": ["salesforce_source_integration_tests", "sf_product_2_data"], "alias": "sf_product_2_data", "checksum": {"name": "sha256", "checksum": "a227b4c050e2eef218b1757e2cf7b282dcc022fb2a4e1d761fc48481e74c7230"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "created_date": "timestamp", "last_modified_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": true}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"created_date": "timestamp", "last_modified_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}}, "created_at": 1720574245.728482, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_product_2_data\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_user_role_data": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "sf_user_role_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_user_role_data.csv", "original_file_path": "seeds/sf_user_role_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_user_role_data", "fqn": ["salesforce_source_integration_tests", "sf_user_role_data"], "alias": "sf_user_role_data", "checksum": {"name": "sha256", "checksum": "2f3861fe3fccbbfb3056beab2f7b6b159910bcf898cade04789a6be752bbf996"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": true}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp"}}, "created_at": 1720574245.7298748, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_user_role_data\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_account_data": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "sf_account_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_account_data.csv", "original_file_path": "seeds/sf_account_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_account_data", "fqn": ["salesforce_source_integration_tests", "sf_account_data"], "alias": "sf_account_data", "checksum": {"name": "sha256", "checksum": "50ebb7785eeb7b560b9c2199d9d0d3686080124b3a37bf571051ea54c6a3c5b4"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "last_activity_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "annual_revenue": "float", "billing_latitude": "float", "billing_longitude": "float", "shipping_latitude": "float", "shipping_longitude": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": true}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"last_activity_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "annual_revenue": "float", "billing_latitude": "float", "billing_longitude": "float", "shipping_latitude": "float", "shipping_longitude": "float"}}, "created_at": 1720574245.731264, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_account_data\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_opportunity_line_item_data": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "sf_opportunity_line_item_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_opportunity_line_item_data.csv", "original_file_path": "seeds/sf_opportunity_line_item_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_opportunity_line_item_data", "fqn": ["salesforce_source_integration_tests", "sf_opportunity_line_item_data"], "alias": "sf_opportunity_line_item_data", "checksum": {"name": "sha256", "checksum": "da3d703e060791ee354dfe83830d026531816141846eda4837b517c5a34b0abd"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "created_date": "timestamp", "last_modified_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "service_date": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": true}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"created_date": "timestamp", "last_modified_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "service_date": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}}, "created_at": 1720574245.73345, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_opportunity_line_item_data\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_user_data": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "sf_user_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_user_data.csv", "original_file_path": "seeds/sf_user_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_user_data", "fqn": ["salesforce_source_integration_tests", "sf_user_data"], "alias": "sf_user_data", "checksum": {"name": "sha256", "checksum": "6ca1169abd0988ebf457e230d077fb22c32404626864575d9b87bd9745cc7a55"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "last_login_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "offline_trial_expiration_date": "timestamp", "latitude": "float", "longitude": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": true}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"last_login_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "offline_trial_expiration_date": "timestamp", "latitude": "float", "longitude": "float"}}, "created_at": 1720574245.7348962, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_user_data\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_contact_data": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "sf_contact_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_contact_data.csv", "original_file_path": "seeds/sf_contact_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_contact_data", "fqn": ["salesforce_source_integration_tests", "sf_contact_data"], "alias": "sf_contact_data", "checksum": {"name": "sha256", "checksum": "e4b8953b2e16533efb7c0bb9f246f64d5b9fad22ed16fb2d65629a02524b78d0"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "birthdate": "timestamp", "created_date": "timestamp", "email_bounced_date": "timestamp", "last_activity_date": "timestamp", "last_curequest_date": "timestamp", "last_cuupdate_date": "timestamp", "last_modified_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": true}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"birthdate": "timestamp", "created_date": "timestamp", "email_bounced_date": "timestamp", "last_activity_date": "timestamp", "last_curequest_date": "timestamp", "last_cuupdate_date": "timestamp", "last_modified_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}}, "created_at": 1720574245.736369, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_contact_data\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_opportunity_data": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "sf_opportunity_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_opportunity_data.csv", "original_file_path": "seeds/sf_opportunity_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_opportunity_data", "fqn": ["salesforce_source_integration_tests", "sf_opportunity_data"], "alias": "sf_opportunity_data", "checksum": {"name": "sha256", "checksum": "6a109616a284522a02550d21119c0257d788a33d01b2ded463808a467266873a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "close_date": "timestamp", "created_date": "timestamp", "last_activity_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "amount": "float", "probability": "float"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": true}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"close_date": "timestamp", "created_date": "timestamp", "last_activity_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "amount": "float", "probability": "float"}}, "created_at": 1720574245.737834, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_opportunity_data\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_opportunity_history_data": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "sf_opportunity_history_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_opportunity_history_data.csv", "original_file_path": "seeds/sf_opportunity_history_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_opportunity_history_data", "fqn": ["salesforce_source_integration_tests", "sf_opportunity_history_data"], "alias": "sf_opportunity_history_data", "checksum": {"name": "sha256", "checksum": "a28441bbd95128aa6440a32b8faec0a21cec1f6e3eae8ff804ba2bdcb499381f"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "close_date": "timestamp", "created_date": "timestamp", "last_activity_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "amount": "float", "expected_revenue": "float", "is_deleted": "boolean"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": true}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"close_date": "timestamp", "created_date": "timestamp", "last_activity_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "amount": "float", "expected_revenue": "float", "is_deleted": "boolean"}}, "created_at": 1720574245.7633338, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_opportunity_history_data\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_order_data": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "sf_order_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_order_data.csv", "original_file_path": "seeds/sf_order_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_order_data", "fqn": ["salesforce_source_integration_tests", "sf_order_data"], "alias": "sf_order_data", "checksum": {"name": "sha256", "checksum": "4cf8cc6e6eb58e8e502f3204fd430468b1c63e35766c56f2fd3029a6988f06f4"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "activated_date": "timestamp", "created_date": "timestamp", "effective_date": "timestamp", "end_date": "timestamp", "last_modified_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": true}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"activated_date": "timestamp", "created_date": "timestamp", "effective_date": "timestamp", "end_date": "timestamp", "last_modified_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}}, "created_at": 1720574245.764839, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_order_data\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_event_data": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "sf_event_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_event_data.csv", "original_file_path": "seeds/sf_event_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_event_data", "fqn": ["salesforce_source_integration_tests", "sf_event_data"], "alias": "sf_event_data", "checksum": {"name": "sha256", "checksum": "7dc5596105508d36674a5019e42592dd7cc48391842da432c7d02f46b63f820a"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "activity_date": "timestamp", "activity_date_time": "timestamp", "created_date": "timestamp", "end_date": "timestamp", "end_date_time": "timestamp", "last_modified_date": "timestamp", "recurrence_2_pattern_start_date": "timestamp", "recurrence_end_date_only": "timestamp", "recurrence_start_date_time": "timestamp", "reminder_date_time": "timestamp", "start_date_time": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": true}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"activity_date": "timestamp", "activity_date_time": "timestamp", "created_date": "timestamp", "end_date": "timestamp", "end_date_time": "timestamp", "last_modified_date": "timestamp", "recurrence_2_pattern_start_date": "timestamp", "recurrence_end_date_only": "timestamp", "recurrence_start_date_time": "timestamp", "reminder_date_time": "timestamp", "start_date_time": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}}, "created_at": 1720574245.766331, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_event_data\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_contact_history_data": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "sf_contact_history_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_contact_history_data.csv", "original_file_path": "seeds/sf_contact_history_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_contact_history_data", "fqn": ["salesforce_source_integration_tests", "sf_contact_history_data"], "alias": "sf_contact_history_data", "checksum": {"name": "sha256", "checksum": "2a872395946af58b6d08eb9be088c1ca2f2e9ffe0b224c3bbcd92086ad2e6507"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "birthdate": "timestamp", "last_activity_date": "timestamp", "last_modified_date": "timestamp", "last_viewed_date": "timestamp", "is_deleted": "boolean"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": true}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"birthdate": "timestamp", "last_activity_date": "timestamp", "last_modified_date": "timestamp", "last_viewed_date": "timestamp", "is_deleted": "boolean"}}, "created_at": 1720574245.76784, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_contact_history_data\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_account_history_data": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "sf_account_history_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_account_history_data.csv", "original_file_path": "seeds/sf_account_history_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_account_history_data", "fqn": ["salesforce_source_integration_tests", "sf_account_history_data"], "alias": "sf_account_history_data", "checksum": {"name": "sha256", "checksum": "e19660a78e56a685df80329bfbcf71324f09a2d5a421540f5fa34cd23d740dcb"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "annual_revenue": "float", "last_activity_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "is_deleted": "boolean"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": true}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"annual_revenue": "float", "last_activity_date": "timestamp", "last_referenced_date": "timestamp", "last_viewed_date": "timestamp", "is_deleted": "boolean"}}, "created_at": 1720574245.76927, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_account_history_data\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "seed.salesforce_source_integration_tests.sf_task_data": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "sf_task_data", "resource_type": "seed", "package_name": "salesforce_source_integration_tests", "path": "sf_task_data.csv", "original_file_path": "seeds/sf_task_data.csv", "unique_id": "seed.salesforce_source_integration_tests.sf_task_data", "fqn": ["salesforce_source_integration_tests", "sf_task_data"], "alias": "sf_task_data", "checksum": {"name": "sha256", "checksum": "b885e6f9737a8e1695c90c0dbbcfbbf3d4849bf3bbc7aba808b44c6d8eac772c"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "seed", "incremental_strategy": null, "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {"_fivetran_synced": "timestamp", "_fivetran_active": "boolean", "_fivetran_start": "timestamp", "_fivetran_end": "timestamp", "activity_date": "timestamp", "completed_date_time": "timestamp", "created_date": "timestamp", "last_modified_date": "timestamp", "recurrence_end_date_only": "timestamp", "recurrence_start_date_only": "timestamp", "reminder_date_time": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "delimiter": ",", "quote_columns": true}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"quote_columns": "{{ true if target.type in ('redshift', 'postgres') else false }}", "column_types": {"activity_date": "timestamp", "completed_date_time": "timestamp", "created_date": "timestamp", "last_modified_date": "timestamp", "recurrence_end_date_only": "timestamp", "recurrence_start_date_only": "timestamp", "reminder_date_time": "timestamp", "system_modstamp": "timestamp", "is_deleted": "boolean"}}, "created_at": 1720574245.770721, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_task_data\"", "raw_code": "", "root_path": "/Users/catherinefritz/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "depends_on": {"macros": []}}, "model.salesforce_source.stg_salesforce__opportunity": {"database": "postgres", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__opportunity", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__opportunity.sql", "original_file_path": "models/salesforce/stg_salesforce__opportunity.sql", "unique_id": "model.salesforce_source.stg_salesforce__opportunity", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__opportunity"], "alias": "stg_salesforce__opportunity", "checksum": {"name": "sha256", "checksum": "90a89ad6ce124dc98f631428d608b7a4e35debbde1744d1a2da8e54caf1214a7"}, "config": {"enabled": true, "alias": null, "schema": "salesforce_source_dev", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": 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": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Represents an opportunity, which is a sale or pending deal.", "columns": {"opportunity_id": {"name": "opportunity_id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "ID of the account associated with this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "amount": {"name": "amount", "description": "Estimated total sale amount. For opportunities with products, the amount is the sum of the related products.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "ID of a related Campaign. This field is defined only for those organizations that have the campaign feature Campaigns enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "close_date": {"name": "close_date", "description": "Required. Date when the opportunity is expected to close. The Close Date will change as you work the sale. It should never be set in stone as it affects your sales pipeline, and it should never be in the past.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Date when the opportunity was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_description": {"name": "opportunity_description", "description": "Text description of the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "expected_revenue": {"name": "expected_revenue", "description": "Read-only field that is equal to the product of the opportunity Amount field and the Probability.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal": {"name": "fiscal", "description": "If fiscal years are not enabled, the name of the fiscal quarter or period in which the opportunity CloseDate falls.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal_quarter": {"name": "fiscal_quarter", "description": "Represents the fiscal quarter. Valid values are 1, 2, 3, or 4.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal_year": {"name": "fiscal_year", "description": "Represents the fiscal year, for example, 2006.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_category": {"name": "forecast_category", "description": "Restricted picklist field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_category_name": {"name": "forecast_category_name", "description": "The name of the forecast category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_open_activity": {"name": "has_open_activity", "description": "Indicates whether an opportunity has an open event or task (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_opportunity_line_item": {"name": "has_opportunity_line_item", "description": "Read-only field that indicates whether the opportunity has associated line items. A value of true means that Opportunity line items have been created for the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_overdue_task": {"name": "has_overdue_task", "description": "Indicates whether an opportunity has an overdue task (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_closed": {"name": "is_closed", "description": "True, if Stage Name Label is Closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_excluded_from_territory_2_filter": {"name": "is_excluded_from_territory_2_filter", "description": "Used for Filter-Based Opportunity Territory Assignment. Indicates whether the opportunity is excluded (True) or included (False) each time the APEX filter is executed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_won": {"name": "is_won", "description": "True, if Stage Name Label is Won.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is one of the following, whichever is the most recent:Due date of the most recent event logged against the record or Due date of the most recently closed task associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_source": {"name": "lead_source", "description": "Source of this opportunity, such as Advertisement or Trade Show.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_name": {"name": "opportunity_name", "description": "Required. A name for this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "next_step": {"name": "next_step", "description": "Description of next task in closing opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "ID of the User who has been assigned to work this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "Pricebook2Id": {"name": "Pricebook2Id", "description": "ID of a related Pricebook2 object. The Pricebook2Id field indicates which Pricebook2 applies to this opportunity. The Pricebook2Id field is defined only for those organizations that have products enabled as a feature. You can specify values for only one field (Pricebook2Id or PricebookId)\u2014not both fields. For this reason, both fields are declared nillable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "pricebook_2_id": {"name": "pricebook_2_id", "description": "Unavailable as of version 3.0. As of version 8.0, the Pricebook object is no longer available. Use the Pricebook2Id field instead, specifying the ID of the Pricebook2 record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "probability": {"name": "probability", "description": "Percentage of estimated confidence in closing the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "stage_name": {"name": "stage_name", "description": "Required. Current stage of this record. The StageName field controls several other fields on an opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "synced_quote_id": {"name": "synced_quote_id", "description": "The ID of the Quote that syncs with the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "territory_2_id": {"name": "territory_2_id", "description": "The ID of the territory that is assigned to the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of opportunity. For example, Existing Business or New Business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_created_this_month": {"name": "is_created_this_month", "description": "Yes, if the opportunity created date is in the current month.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_created_this_quarter": {"name": "is_created_this_quarter", "description": "Yes, if the opportunity created date is in the current quarter.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "days_since_created": {"name": "days_since_created", "description": "The difference, in days, between the opportunity created date and the current timestamp.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "days_to_close": {"name": "days_to_close", "description": "The difference, in days, between the opportunity created date and the opportunity close date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_closed_this_month": {"name": "is_closed_this_month", "description": "Yes, if the opportunity close date is in the current month.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_closed_this_quarter": {"name": "is_closed_this_quarter", "description": "Yes, if the opportunity close date is in the current quarter.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "salesforce_source_{{ var('directed_schema','dev') }}"}, "created_at": 1720574246.3469849, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__opportunity\"", "raw_code": "{% set opportunity_column_list = get_opportunity_columns() -%}\n{% set opportunity_dict = column_list_to_dict(opportunity_column_list) -%}\n\nwith fields as (\n\n select\n\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','opportunity')),\n staging_columns=opportunity_column_list\n )\n }}\n\n from {{ source('salesforce','opportunity') }}\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n {{ salesforce_source.coalesce_rename(\"account_id\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"amount\", opportunity_dict, datatype=dbt.type_numeric()) }},\n {{ salesforce_source.coalesce_rename(\"campaign_id\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"close_date\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"created_date\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"description\", opportunity_dict, alias=\"opportunity_description\") }},\n {{ salesforce_source.coalesce_rename(\"expected_revenue\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"fiscal\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"fiscal_quarter\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"fiscal_year\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"forecast_category\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"forecast_category_name\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"has_open_activity\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"has_opportunity_line_item\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"has_overdue_task\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"id\", opportunity_dict, alias=\"opportunity_id\") }},\n {{ salesforce_source.coalesce_rename(\"is_closed\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"is_deleted\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"is_won\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_activity_date\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_referenced_date\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_viewed_date\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"lead_source\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"name\", opportunity_dict, alias=\"opportunity_name\") }},\n {{ salesforce_source.coalesce_rename(\"next_step\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"owner_id\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"probability\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"record_type_id\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"stage_name\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"synced_quote_id\", opportunity_dict) }},\n {{ salesforce_source.coalesce_rename(\"type\", opportunity_dict) }}\n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__opportunity_pass_through_columns') }}\n\n from fields\n where coalesce(_fivetran_active, true)\n), \n\ncalculated as (\n \n select \n *,\n created_date >= {{ dbt.date_trunc('month', dbt.current_timestamp_backcompat()) }} as is_created_this_month,\n created_date >= {{ dbt.date_trunc('quarter', dbt.current_timestamp_backcompat()) }} as is_created_this_quarter,\n {{ dbt.datediff(dbt.current_timestamp_backcompat(), 'created_date', 'day') }} as days_since_created,\n {{ dbt.datediff('close_date', 'created_date', 'day') }} as days_to_close,\n {{ dbt.date_trunc('month', 'close_date') }} = {{ dbt.date_trunc('month', dbt.current_timestamp_backcompat()) }} as is_closed_this_month,\n {{ dbt.date_trunc('quarter', 'close_date') }} = {{ dbt.date_trunc('quarter', dbt.current_timestamp_backcompat()) }} as is_closed_this_quarter\n from final\n)\n\nselect * \nfrom calculated\nwhere not coalesce(is_deleted, false)", "language": "sql", "refs": [], "sources": [["salesforce", "opportunity"], ["salesforce", "opportunity"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_opportunity_columns", "macro.salesforce_source.column_list_to_dict", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.salesforce_source.coalesce_rename", "macro.dbt.type_numeric", "macro.fivetran_utils.fill_pass_through_columns", "macro.dbt.current_timestamp_backcompat", "macro.dbt.date_trunc", "macro.dbt.datediff"], "nodes": ["source.salesforce_source.salesforce.opportunity"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__opportunity.sql", "compiled": true, "compiled_code": "with fields as (\n\n select\n\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n account_id\n \n as \n \n account_id\n \n, \n \n \n amount\n \n as \n \n amount\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n close_date\n \n as \n \n close_date\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n expected_revenue\n \n as \n \n expected_revenue\n \n, \n \n \n fiscal\n \n as \n \n fiscal\n \n, \n \n \n fiscal_quarter\n \n as \n \n fiscal_quarter\n \n, \n \n \n fiscal_year\n \n as \n \n fiscal_year\n \n, \n \n \n forecast_category\n \n as \n \n forecast_category\n \n, \n \n \n forecast_category_name\n \n as \n \n forecast_category_name\n \n, \n \n \n has_open_activity\n \n as \n \n has_open_activity\n \n, \n \n \n has_opportunity_line_item\n \n as \n \n has_opportunity_line_item\n \n, \n \n \n has_overdue_task\n \n as \n \n has_overdue_task\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_closed\n \n as \n \n is_closed\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n is_won\n \n as \n \n is_won\n \n, \n \n \n last_activity_date\n \n as \n \n last_activity_date\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n lead_source\n \n as \n \n lead_source\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n next_step\n \n as \n \n next_step\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n probability\n \n as \n \n probability\n \n, \n \n \n record_type_id\n \n as \n \n record_type_id\n \n, \n \n \n stage_name\n \n as \n \n stage_name\n \n, \n \n \n synced_quote_id\n \n as \n \n synced_quote_id\n \n, \n \n \n type\n \n as \n \n type\n \n, \n cast(null as TEXT) as \n \n AccountId\n \n , \n cast(null as TEXT) as \n \n CampaignId\n \n , \n cast(null as timestamp) as \n \n CloseDate\n \n , \n cast(null as timestamp) as \n \n CreatedDate\n \n , \n cast(null as numeric(28,6)) as \n \n ExpectedRevenue\n \n , \n cast(null as integer) as \n \n FiscalQuarter\n \n , \n cast(null as integer) as \n \n FiscalYear\n \n , \n cast(null as TEXT) as \n \n ForecastCategory\n \n , \n cast(null as TEXT) as \n \n ForecastCategoryName\n \n , \n cast(null as boolean) as \n \n HasOpenActivity\n \n , \n cast(null as boolean) as \n \n HasOpportunityLineItem\n \n , \n cast(null as boolean) as \n \n HasOverdueTask\n \n , \n cast(null as boolean) as \n \n IsClosed\n \n , \n cast(null as boolean) as \n \n IsDeleted\n \n , \n cast(null as boolean) as \n \n IsWon\n \n , \n cast(null as timestamp) as \n \n LastActivityDate\n \n , \n cast(null as timestamp) as \n \n LastReferencedDate\n \n , \n cast(null as timestamp) as \n \n LastViewedDate\n \n , \n cast(null as TEXT) as \n \n LeadSource\n \n , \n cast(null as TEXT) as \n \n NextStep\n \n , \n cast(null as TEXT) as \n \n OwnerId\n \n , \n cast(null as TEXT) as \n \n RecordTypeId\n \n , \n cast(null as TEXT) as \n \n StageName\n \n , \n cast(null as TEXT) as \n \n SyncedQuoteId\n \n \n\n\n\n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_opportunity_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n coalesce(cast(AccountId as TEXT),\n cast(account_id as TEXT))\n as account_id,\n \n\n\n cast(Amount as numeric(28,6)) as amount,\n \n\n\n coalesce(cast(CampaignId as TEXT),\n cast(campaign_id as TEXT))\n as campaign_id,\n \n\n\n coalesce(cast(CloseDate as timestamp),\n cast(close_date as timestamp))\n as close_date,\n \n\n\n coalesce(cast(CreatedDate as timestamp),\n cast(created_date as timestamp))\n as created_date,\n \n\n\n cast(Description as TEXT) as opportunity_description,\n \n\n\n coalesce(cast(ExpectedRevenue as numeric(28,6)),\n cast(expected_revenue as numeric(28,6)))\n as expected_revenue,\n \n\n\n cast(Fiscal as TEXT) as fiscal,\n \n\n\n coalesce(cast(FiscalQuarter as integer),\n cast(fiscal_quarter as integer))\n as fiscal_quarter,\n \n\n\n coalesce(cast(FiscalYear as integer),\n cast(fiscal_year as integer))\n as fiscal_year,\n \n\n\n coalesce(cast(ForecastCategory as TEXT),\n cast(forecast_category as TEXT))\n as forecast_category,\n \n\n\n coalesce(cast(ForecastCategoryName as TEXT),\n cast(forecast_category_name as TEXT))\n as forecast_category_name,\n \n\n\n coalesce(cast(HasOpenActivity as boolean),\n cast(has_open_activity as boolean))\n as has_open_activity,\n \n\n\n coalesce(cast(HasOpportunityLineItem as boolean),\n cast(has_opportunity_line_item as boolean))\n as has_opportunity_line_item,\n \n\n\n coalesce(cast(HasOverdueTask as boolean),\n cast(has_overdue_task as boolean))\n as has_overdue_task,\n \n\n\n cast(Id as TEXT) as opportunity_id,\n \n\n\n coalesce(cast(IsClosed as boolean),\n cast(is_closed as boolean))\n as is_closed,\n \n\n\n coalesce(cast(IsDeleted as boolean),\n cast(is_deleted as boolean))\n as is_deleted,\n \n\n\n coalesce(cast(IsWon as boolean),\n cast(is_won as boolean))\n as is_won,\n \n\n\n coalesce(cast(LastActivityDate as timestamp),\n cast(last_activity_date as timestamp))\n as last_activity_date,\n \n\n\n coalesce(cast(LastReferencedDate as timestamp),\n cast(last_referenced_date as timestamp))\n as last_referenced_date,\n \n\n\n coalesce(cast(LastViewedDate as timestamp),\n cast(last_viewed_date as timestamp))\n as last_viewed_date,\n \n\n\n coalesce(cast(LeadSource as TEXT),\n cast(lead_source as TEXT))\n as lead_source,\n \n\n\n cast(Name as TEXT) as opportunity_name,\n \n\n\n coalesce(cast(NextStep as TEXT),\n cast(next_step as TEXT))\n as next_step,\n \n\n\n coalesce(cast(OwnerId as TEXT),\n cast(owner_id as TEXT))\n as owner_id,\n \n\n\n cast(Probability as float) as probability,\n \n\n\n coalesce(cast(RecordTypeId as TEXT),\n cast(record_type_id as TEXT))\n as record_type_id,\n \n\n\n coalesce(cast(StageName as TEXT),\n cast(stage_name as TEXT))\n as stage_name,\n \n\n\n coalesce(cast(SyncedQuoteId as TEXT),\n cast(synced_quote_id as TEXT))\n as synced_quote_id,\n \n\n\n cast(Type as TEXT) as type\n \n \n\n\n\n\n\n from fields\n where coalesce(_fivetran_active, true)\n), \n\ncalculated as (\n \n select \n *,\n created_date >= date_trunc('month', \n current_timestamp::timestamp\n) as is_created_this_month,\n created_date >= date_trunc('quarter', \n current_timestamp::timestamp\n) as is_created_this_quarter,\n \n ((created_date)::date - (\n current_timestamp::timestamp\n)::date)\n as days_since_created,\n \n ((created_date)::date - (close_date)::date)\n as days_to_close,\n date_trunc('month', close_date) = date_trunc('month', \n current_timestamp::timestamp\n) as is_closed_this_month,\n date_trunc('quarter', close_date) = date_trunc('quarter', \n current_timestamp::timestamp\n) as is_closed_this_quarter\n from final\n)\n\nselect * \nfrom calculated\nwhere not coalesce(is_deleted, false)", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__user_role": {"database": "postgres", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__user_role", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__user_role.sql", "original_file_path": "models/salesforce/stg_salesforce__user_role.sql", "unique_id": "model.salesforce_source.stg_salesforce__user_role", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__user_role"], "alias": "stg_salesforce__user_role", "checksum": {"name": "sha256", "checksum": "6646446e9a0329fc8f87b561455a791a2dddaade3072b49418794924a82fcee3"}, "config": {"enabled": true, "alias": null, "schema": "salesforce_source_dev", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": 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": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Represents a user role in your organization.", "columns": {"user_role_id": {"name": "user_role_id", "description": "The unique, system-generated ID assigned during creation", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "True, if this field has been deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "case_access_for_account_owner": {"name": "case_access_for_account_owner", "description": "The case access level for the account owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "contact_access_for_account_owner": {"name": "contact_access_for_account_owner", "description": "The contact access level for the account owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "developer_name": {"name": "developer_name", "description": "The unique name of the object in the API.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_user_id": {"name": "forecast_user_id", "description": "The ID of the forecast manager associated with this role.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "may_forecast_manager_share": {"name": "may_forecast_manager_share", "description": "Indicates whether the forecast manager can manually share their own forecast.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "user_role_name": {"name": "user_role_name", "description": "Required. Name of the role. Corresponds to Label on the user interface.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_access_for_account_owner": {"name": "opportunity_access_for_account_owner", "description": "Required. The opportunity access level for the account owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_role_id": {"name": "parent_role_id", "description": "The ID of the parent role.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "portal_type": {"name": "portal_type", "description": "This value indicates the type of portal for the role", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "rollup_description": {"name": "rollup_description", "description": "Description of the forecast rollup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "unrendered_config": {"materialized": "table", "enabled": true, "schema": "salesforce_source_{{ var('directed_schema','dev') }}"}, "created_at": 1720574246.357725, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__user_role\"", "raw_code": "--To disable this model, set the salesforce__user_role_enabled within your dbt_project.yml file to False.\n{{ config(enabled=var('salesforce__user_role_enabled', True)) }}\n\n{% set user_role_column_list = get_user_role_columns() -%}\n{% set user_role_dict = column_list_to_dict(user_role_column_list) -%}\n\nwith fields as (\n\n select\n \n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','user_role')),\n staging_columns=user_role_column_list\n )\n }}\n\n from {{ source('salesforce','user_role') }}\n), \n\nfinal as (\n\n select\n _fivetran_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n {{ salesforce_source.coalesce_rename(\"developer_name\", user_role_dict ) }},\n {{ salesforce_source.coalesce_rename(\"id\", user_role_dict, alias=\"user_role_id\") }},\n {{ salesforce_source.coalesce_rename(\"name\", user_role_dict, alias=\"user_role_name\") }},\n {{ salesforce_source.coalesce_rename(\"opportunity_access_for_account_owner\", user_role_dict ) }},\n {{ salesforce_source.coalesce_rename(\"parent_role_id\", user_role_dict ) }},\n {{ salesforce_source.coalesce_rename(\"rollup_description\", user_role_dict ) }}\n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__user_role_pass_through_columns') }}\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "language": "sql", "refs": [], "sources": [["salesforce", "user_role"], ["salesforce", "user_role"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_user_role_columns", "macro.salesforce_source.column_list_to_dict", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.salesforce_source.coalesce_rename", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["source.salesforce_source.salesforce.user_role"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__user_role.sql", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__user_role_enabled within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n developer_name\n \n as \n \n developer_name\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n opportunity_access_for_account_owner\n \n as \n \n opportunity_access_for_account_owner\n \n, \n \n \n parent_role_id\n \n as \n \n parent_role_id\n \n, \n \n \n rollup_description\n \n as \n \n rollup_description\n \n, \n cast(null as TEXT) as \n \n DeveloperName\n \n , \n cast(null as TEXT) as \n \n OpportunityAccessForAccountOwner\n \n , \n cast(null as TEXT) as \n \n ParentRoleId\n \n , \n cast(null as TEXT) as \n \n RollupDescription\n \n \n\n\n\n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_user_role_data\"\n), \n\nfinal as (\n\n select\n _fivetran_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n coalesce(cast(DeveloperName as TEXT),\n cast(developer_name as TEXT))\n as developer_name,\n \n\n\n cast(Id as TEXT) as user_role_id,\n \n\n\n cast(Name as TEXT) as user_role_name,\n \n\n\n coalesce(cast(OpportunityAccessForAccountOwner as TEXT),\n cast(opportunity_access_for_account_owner as TEXT))\n as opportunity_access_for_account_owner,\n \n\n\n coalesce(cast(ParentRoleId as TEXT),\n cast(parent_role_id as TEXT))\n as parent_role_id,\n \n\n\n coalesce(cast(RollupDescription as TEXT),\n cast(rollup_description as TEXT))\n as rollup_description\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__contact": {"database": "postgres", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__contact", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__contact.sql", "original_file_path": "models/salesforce/stg_salesforce__contact.sql", "unique_id": "model.salesforce_source.stg_salesforce__contact", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__contact"], "alias": "stg_salesforce__contact", "checksum": {"name": "sha256", "checksum": "a30d335ad3c0250a5414ca775330a8ce6ce5a770dc131b1bcb530a420c8049e3"}, "config": {"enabled": true, "alias": null, "schema": "salesforce_source_dev", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": 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": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Represents a contact, which is a person associated with an account.", "columns": {"contact_id": {"name": "contact_id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "ID of the account that\u2019s the parent of this contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "department": {"name": "department", "description": "The contact\u2019s department.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "contact_description": {"name": "contact_description", "description": "A description of the contact. Label is Contact Description up to 32 KB.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "The contact\u2019s email address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The contact\u2019s first name up to 40 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "home_phone": {"name": "home_phone", "description": "The contact\u2019s home telephone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "individual_id": {"name": "individual_id", "description": "ID of the data privacy record associated with this contact. This field is available if Data Protection and Privacy is enabled. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is the most recent of either: Due date of the most recent event logged against the record. Due date of the most recently closed task associated with the record.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "Required. Last name of the contact up to 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_source": {"name": "lead_source", "description": "The lead\u2019s source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_city": {"name": "mailing_city", "description": "Mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_country": {"name": "mailing_country", "description": "Mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_country_code": {"name": "mailing_country_code", "description": "The ISO codes for the mailing address\u2019s state and country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_postal_code": {"name": "mailing_postal_code", "description": "Mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_state": {"name": "mailing_state", "description": "Mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_state_code": {"name": "mailing_state_code", "description": "The ISO codes for the mailing address\u2019s state and country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_street": {"name": "mailing_street", "description": "Street address for mailing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "master_record_id": {"name": "master_record_id", "description": "If this record was deleted as the result of a merge, this field contains the ID of the record that remains. If this record was deleted for any other reason, or has not been deleted, the value is null. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mobile_phone": {"name": "mobile_phone", "description": "Contact\u2019s mobile phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "contact_name": {"name": "contact_name", "description": "Concatenation of FirstName, MiddleName, LastName, and Suffix up to 203 characters, including whitespaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner of the account associated with this contact. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "phone": {"name": "phone", "description": "Telephone number for the contact. Label is Business Phone.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reports_to_id": {"name": "reports_to_id", "description": "This field doesn\u2019t appear if IsPersonAccount is true. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "title": {"name": "title", "description": "Title", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "salesforce_source_{{ var('directed_schema','dev') }}"}, "created_at": 1720574246.3590279, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__contact\"", "raw_code": "{% set contact_column_list = get_contact_columns() -%}\n{% set contact_dict = column_list_to_dict(contact_column_list) -%}\n\nwith fields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','contact')),\n staging_columns=contact_column_list\n )\n }}\n \n from {{ source('salesforce','contact') }}\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n {{ salesforce_source.coalesce_rename(\"id\", contact_dict, alias=\"contact_id\") }},\n {{ salesforce_source.coalesce_rename(\"account_id\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"department\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"description\", contact_dict, alias=\"contact_description\") }},\n {{ salesforce_source.coalesce_rename(\"email\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"first_name\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"home_phone\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"individual_id\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"is_deleted\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_activity_date\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_modified_by_id\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_modified_date\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_name\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_referenced_date\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_viewed_date\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"lead_source\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"mailing_city\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"mailing_country\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"mailing_country_code\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"mailing_postal_code\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"mailing_state\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"mailing_state_code\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"mailing_street\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"master_record_id\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"mobile_phone\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"name\", contact_dict, alias=\"contact_name\") }},\n {{ salesforce_source.coalesce_rename(\"owner_id\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"phone\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"reports_to_id\", contact_dict) }},\n {{ salesforce_source.coalesce_rename(\"title\", contact_dict) }}\n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__contact_pass_through_columns') }}\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "language": "sql", "refs": [], "sources": [["salesforce", "contact"], ["salesforce", "contact"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_contact_columns", "macro.salesforce_source.column_list_to_dict", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.salesforce_source.coalesce_rename", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["source.salesforce_source.salesforce.contact"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__contact.sql", "compiled": true, "compiled_code": "with fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n account_id\n \n as \n \n account_id\n \n, \n \n \n department\n \n as \n \n department\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n email\n \n as \n \n email\n \n, \n \n \n first_name\n \n as \n \n first_name\n \n, \n \n \n home_phone\n \n as \n \n home_phone\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n individual_id\n \n as \n \n individual_id\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n last_activity_date\n \n as \n \n last_activity_date\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n last_name\n \n as \n \n last_name\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n lead_source\n \n as \n \n lead_source\n \n, \n \n \n mailing_city\n \n as \n \n mailing_city\n \n, \n \n \n mailing_country\n \n as \n \n mailing_country\n \n, \n \n \n mailing_country_code\n \n as \n \n mailing_country_code\n \n, \n \n \n mailing_postal_code\n \n as \n \n mailing_postal_code\n \n, \n \n \n mailing_state\n \n as \n \n mailing_state\n \n, \n \n \n mailing_state_code\n \n as \n \n mailing_state_code\n \n, \n \n \n mailing_street\n \n as \n \n mailing_street\n \n, \n \n \n master_record_id\n \n as \n \n master_record_id\n \n, \n \n \n mobile_phone\n \n as \n \n mobile_phone\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n phone\n \n as \n \n phone\n \n, \n \n \n reports_to_id\n \n as \n \n reports_to_id\n \n, \n \n \n title\n \n as \n \n title\n \n, \n cast(null as TEXT) as \n \n AccountId\n \n , \n cast(null as TEXT) as \n \n FirstName\n \n , \n cast(null as TEXT) as \n \n HomePhone\n \n , \n cast(null as TEXT) as \n \n IndividualId\n \n , \n cast(null as boolean) as \n \n IsDeleted\n \n , \n cast(null as timestamp) as \n \n LastActivityDate\n \n , \n cast(null as TEXT) as \n \n LastModifiedById\n \n , \n cast(null as timestamp) as \n \n LastModifiedDate\n \n , \n cast(null as TEXT) as \n \n LastName\n \n , \n cast(null as timestamp) as \n \n LastReferencedDate\n \n , \n cast(null as timestamp) as \n \n LastViewedDate\n \n , \n cast(null as TEXT) as \n \n LeadSource\n \n , \n cast(null as TEXT) as \n \n MailingCity\n \n , \n cast(null as TEXT) as \n \n MailingCountry\n \n , \n cast(null as TEXT) as \n \n MailingCountryCode\n \n , \n cast(null as TEXT) as \n \n MailingPostalCode\n \n , \n cast(null as TEXT) as \n \n MailingState\n \n , \n cast(null as TEXT) as \n \n MailingStateCode\n \n , \n cast(null as TEXT) as \n \n MailingStreet\n \n , \n cast(null as TEXT) as \n \n MasterRecordId\n \n , \n cast(null as TEXT) as \n \n MobilePhone\n \n , \n cast(null as TEXT) as \n \n OwnerId\n \n , \n cast(null as TEXT) as \n \n ReportsToId\n \n \n\n\n \n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_contact_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n cast(Id as TEXT) as contact_id,\n \n\n\n coalesce(cast(AccountId as TEXT),\n cast(account_id as TEXT))\n as account_id,\n \n\n\n cast(Department as TEXT) as department,\n \n\n\n cast(Description as TEXT) as contact_description,\n \n\n\n cast(Email as TEXT) as email,\n \n\n\n coalesce(cast(FirstName as TEXT),\n cast(first_name as TEXT))\n as first_name,\n \n\n\n coalesce(cast(HomePhone as TEXT),\n cast(home_phone as TEXT))\n as home_phone,\n \n\n\n coalesce(cast(IndividualId as TEXT),\n cast(individual_id as TEXT))\n as individual_id,\n \n\n\n coalesce(cast(IsDeleted as boolean),\n cast(is_deleted as boolean))\n as is_deleted,\n \n\n\n coalesce(cast(LastActivityDate as timestamp),\n cast(last_activity_date as timestamp))\n as last_activity_date,\n \n\n\n coalesce(cast(LastModifiedById as TEXT),\n cast(last_modified_by_id as TEXT))\n as last_modified_by_id,\n \n\n\n coalesce(cast(LastModifiedDate as timestamp),\n cast(last_modified_date as timestamp))\n as last_modified_date,\n \n\n\n coalesce(cast(LastName as TEXT),\n cast(last_name as TEXT))\n as last_name,\n \n\n\n coalesce(cast(LastReferencedDate as timestamp),\n cast(last_referenced_date as timestamp))\n as last_referenced_date,\n \n\n\n coalesce(cast(LastViewedDate as timestamp),\n cast(last_viewed_date as timestamp))\n as last_viewed_date,\n \n\n\n coalesce(cast(LeadSource as TEXT),\n cast(lead_source as TEXT))\n as lead_source,\n \n\n\n coalesce(cast(MailingCity as TEXT),\n cast(mailing_city as TEXT))\n as mailing_city,\n \n\n\n coalesce(cast(MailingCountry as TEXT),\n cast(mailing_country as TEXT))\n as mailing_country,\n \n\n\n coalesce(cast(MailingCountryCode as TEXT),\n cast(mailing_country_code as TEXT))\n as mailing_country_code,\n \n\n\n coalesce(cast(MailingPostalCode as TEXT),\n cast(mailing_postal_code as TEXT))\n as mailing_postal_code,\n \n\n\n coalesce(cast(MailingState as TEXT),\n cast(mailing_state as TEXT))\n as mailing_state,\n \n\n\n coalesce(cast(MailingStateCode as TEXT),\n cast(mailing_state_code as TEXT))\n as mailing_state_code,\n \n\n\n coalesce(cast(MailingStreet as TEXT),\n cast(mailing_street as TEXT))\n as mailing_street,\n \n\n\n coalesce(cast(MasterRecordId as TEXT),\n cast(master_record_id as TEXT))\n as master_record_id,\n \n\n\n coalesce(cast(MobilePhone as TEXT),\n cast(mobile_phone as TEXT))\n as mobile_phone,\n \n\n\n cast(Name as TEXT) as contact_name,\n \n\n\n coalesce(cast(OwnerId as TEXT),\n cast(owner_id as TEXT))\n as owner_id,\n \n\n\n cast(Phone as TEXT) as phone,\n \n\n\n coalesce(cast(ReportsToId as TEXT),\n cast(reports_to_id as TEXT))\n as reports_to_id,\n \n\n\n cast(Title as TEXT) as title\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__account": {"database": "postgres", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__account", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__account.sql", "original_file_path": "models/salesforce/stg_salesforce__account.sql", "unique_id": "model.salesforce_source.stg_salesforce__account", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__account"], "alias": "stg_salesforce__account", "checksum": {"name": "sha256", "checksum": "8fc5b92b78f3f85d3534f826e2d53ed402cbd62966353665d443a9f4753a7d87"}, "config": {"enabled": true, "alias": null, "schema": "salesforce_source_dev", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": 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": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Represents an individual account, which is an organization or person involved with your business (such as customers, competitors, and partners).", "columns": {"account_id": {"name": "account_id", "description": "The unique, system-generated ID assigned during creation", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_number": {"name": "account_number", "description": "Account number assigned to this account (not the unique, system-generated ID assigned during creation).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_source": {"name": "account_source", "description": "The source of the account record. For example, Advertisement, Data.com, or Trade Show.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "annual_revenue": {"name": "annual_revenue", "description": "Estimated annual revenue of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_city": {"name": "billing_city", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_country": {"name": "billing_country", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_country_code": {"name": "billing_country_code", "description": "The ISO country code for the account\u2019s billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_geocode_accuracy": {"name": "billing_geocode_accuracy", "description": "Accuracy level of the geocode for the billing address. See Compound Field Considerations and Limitations for details on geolocation compound fields.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_latitude": {"name": "billing_latitude", "description": "Used with BillingLongitude to specify the precise geolocation of a billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_longitude": {"name": "billing_longitude", "description": "Used with BillingLatitude to specify the precise geolocation of a billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_postal_code": {"name": "billing_postal_code", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_state": {"name": "billing_state", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_state_code": {"name": "billing_state_code", "description": "The ISO state code for the account\u2019s billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_street": {"name": "billing_street", "description": "Street address for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_description": {"name": "account_description", "description": "Text description of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fax": {"name": "fax", "description": "Fax number for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "industry": {"name": "industry", "description": "An industry associated with this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "jigsaw_company_id": {"name": "jigsaw_company_id", "description": "References the ID of a company in Data.com. If an account has a value in this field, it means that the account was imported from Data.com.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is one of the following, whichever is the most recent", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "master_record_id": {"name": "master_record_id", "description": "If this object was deleted as the result of a merge, this field contains the ID of the record that was kept. If this object was deleted for any other reason, or has not been deleted, the value is null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_name": {"name": "account_name", "description": "Required. Name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "number_of_employees": {"name": "number_of_employees", "description": "Number of employees working at the company represented by this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "The ID of the user who currently owns this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "ownership": {"name": "ownership", "description": "Ownership type for the account, for example Private, Public, or Subsidiary.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "ID of the parent object, if any.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "phone": {"name": "phone", "description": "Phone number for this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "photo_url": {"name": "photo_url", "description": "Path to be combined with the URL of a Salesforce instance (for example, https://yourInstance.salesforce.com/) to generate a URL to request the social network profile image associated with the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "rating": {"name": "rating", "description": "The account\u2019s prospect rating, for example Hot, Warm, or Cold.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_city": {"name": "shipping_city", "description": "Details of the shipping address for this account", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_country": {"name": "shipping_country", "description": "Details of the shipping address for this account. Country", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_country_code": {"name": "shipping_country_code", "description": "The ISO country code for the account\u2019s shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_geocode_accuracy": {"name": "shipping_geocode_accuracy", "description": "Accuracy level of the geocode for the shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_latitude": {"name": "shipping_latitude", "description": "Used with ShippingLongitude to specify the precise geolocation of a shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_longitude": {"name": "shipping_longitude", "description": "Used with ShippingLatitude to specify the precise geolocation of an address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_postal_code": {"name": "shipping_postal_code", "description": "Details of the shipping address for this account. Postal code", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_state": {"name": "shipping_state", "description": "Details of the shipping address for this account. State", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_state_code": {"name": "shipping_state_code", "description": "The ISO state code for the account\u2019s shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_street": {"name": "shipping_street", "description": "The street address of the shipping address for this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sic": {"name": "sic", "description": "Standard Industrial Classification code of the company\u2019s main business categorization, for example, 57340 for Electronics.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sic_desc": {"name": "sic_desc", "description": "A brief description of an organization\u2019s line of business, based on its SIC code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "site": {"name": "site", "description": "Name of the account\u2019s location, for example Headquarters or London.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "ticker_symbol": {"name": "ticker_symbol", "description": "The stock market symbol for this account. This field is available on business accounts, not person accounts.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of account, for example, Customer, Competitor, or Partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "website": {"name": "website", "description": "The website of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "salesforce_source_{{ var('directed_schema','dev') }}"}, "created_at": 1720574246.344312, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__account\"", "raw_code": "{% set account_column_list = get_account_columns() -%}\n{% set account_dict = column_list_to_dict(account_column_list) -%}\n\nwith fields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','account')),\n staging_columns=account_column_list\n )\n }}\n\n from {{ source('salesforce','account') }}\n), \n\nfinal as (\n select\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n {{ salesforce_source.coalesce_rename(\"account_number\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"account_source\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"annual_revenue\", account_dict, datatype=dbt.type_numeric()) }},\n {{ salesforce_source.coalesce_rename(\"billing_city\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"billing_country\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"billing_postal_code\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"billing_state\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"billing_state_code\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"billing_street\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"description\", account_dict, alias=\"account_description\" ) }},\n {{ salesforce_source.coalesce_rename(\"id\", account_dict, alias=\"account_id\") }},\n {{ salesforce_source.coalesce_rename(\"industry\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"is_deleted\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_activity_date\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_referenced_date\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_viewed_date\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"master_record_id\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"name\", account_dict, alias=\"account_name\" ) }},\n {{ salesforce_source.coalesce_rename(\"number_of_employees\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"owner_id\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"ownership\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"parent_id\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"rating\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"record_type_id\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"shipping_city\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"shipping_country\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"shipping_country_code\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"shipping_postal_code\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"shipping_state\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"shipping_state_code\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"shipping_street\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"type\", account_dict) }},\n {{ salesforce_source.coalesce_rename(\"website\", account_dict) }}\n\n {{ fivetran_utils.fill_pass_through_columns('salesforce__account_pass_through_columns') }}\n\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "language": "sql", "refs": [], "sources": [["salesforce", "account"], ["salesforce", "account"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_account_columns", "macro.salesforce_source.column_list_to_dict", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.salesforce_source.coalesce_rename", "macro.dbt.type_numeric", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["source.salesforce_source.salesforce.account"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__account.sql", "compiled": true, "compiled_code": "with fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n account_number\n \n as \n \n account_number\n \n, \n \n \n account_source\n \n as \n \n account_source\n \n, \n \n \n annual_revenue\n \n as \n \n annual_revenue\n \n, \n \n \n billing_city\n \n as \n \n billing_city\n \n, \n \n \n billing_country\n \n as \n \n billing_country\n \n, \n \n \n billing_postal_code\n \n as \n \n billing_postal_code\n \n, \n \n \n billing_state\n \n as \n \n billing_state\n \n, \n \n \n billing_state_code\n \n as \n \n billing_state_code\n \n, \n \n \n billing_street\n \n as \n \n billing_street\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n industry\n \n as \n \n industry\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n last_activity_date\n \n as \n \n last_activity_date\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n master_record_id\n \n as \n \n master_record_id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n number_of_employees\n \n as \n \n number_of_employees\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n ownership\n \n as \n \n ownership\n \n, \n \n \n parent_id\n \n as \n \n parent_id\n \n, \n \n \n rating\n \n as \n \n rating\n \n, \n \n \n record_type_id\n \n as \n \n record_type_id\n \n, \n \n \n shipping_city\n \n as \n \n shipping_city\n \n, \n \n \n shipping_country\n \n as \n \n shipping_country\n \n, \n \n \n shipping_country_code\n \n as \n \n shipping_country_code\n \n, \n \n \n shipping_postal_code\n \n as \n \n shipping_postal_code\n \n, \n \n \n shipping_state\n \n as \n \n shipping_state\n \n, \n \n \n shipping_state_code\n \n as \n \n shipping_state_code\n \n, \n \n \n shipping_street\n \n as \n \n shipping_street\n \n, \n \n \n type\n \n as \n \n type\n \n, \n \n \n website\n \n as \n \n website\n \n, \n cast(null as TEXT) as \n \n AccountNumber\n \n , \n cast(null as TEXT) as \n \n AccountSource\n \n , \n cast(null as float) as \n \n AnnualRevenue\n \n , \n cast(null as TEXT) as \n \n BillingCity\n \n , \n cast(null as TEXT) as \n \n BillingCountry\n \n , \n cast(null as TEXT) as \n \n BillingPostalCode\n \n , \n cast(null as TEXT) as \n \n BillingState\n \n , \n cast(null as TEXT) as \n \n BillingStateCode\n \n , \n cast(null as TEXT) as \n \n BillingStreet\n \n , \n cast(null as boolean) as \n \n IsDeleted\n \n , \n cast(null as timestamp) as \n \n LastActivityDate\n \n , \n cast(null as timestamp) as \n \n LastReferencedDate\n \n , \n cast(null as timestamp) as \n \n LastViewedDate\n \n , \n cast(null as TEXT) as \n \n MasterRecordId\n \n , \n cast(null as integer) as \n \n NumberOfEmployees\n \n , \n cast(null as TEXT) as \n \n OwnerId\n \n , \n cast(null as TEXT) as \n \n ParentId\n \n , \n cast(null as TEXT) as \n \n RecordTypeId\n \n , \n cast(null as TEXT) as \n \n ShippingCity\n \n , \n cast(null as TEXT) as \n \n ShippingCountry\n \n , \n cast(null as TEXT) as \n \n ShippingCountryCode\n \n , \n cast(null as TEXT) as \n \n ShippingPostalCode\n \n , \n cast(null as TEXT) as \n \n ShippingState\n \n , \n cast(null as TEXT) as \n \n ShippingStateCode\n \n , \n cast(null as TEXT) as \n \n ShippingStreet\n \n \n\n\n\n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_account_data\"\n), \n\nfinal as (\n select\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n coalesce(cast(AccountNumber as TEXT),\n cast(account_number as TEXT))\n as account_number,\n \n\n\n coalesce(cast(AccountSource as TEXT),\n cast(account_source as TEXT))\n as account_source,\n \n\n\n coalesce(cast(AnnualRevenue as numeric(28,6)),\n cast(annual_revenue as numeric(28,6)))\n as annual_revenue,\n \n\n\n coalesce(cast(BillingCity as TEXT),\n cast(billing_city as TEXT))\n as billing_city,\n \n\n\n coalesce(cast(BillingCountry as TEXT),\n cast(billing_country as TEXT))\n as billing_country,\n \n\n\n coalesce(cast(BillingPostalCode as TEXT),\n cast(billing_postal_code as TEXT))\n as billing_postal_code,\n \n\n\n coalesce(cast(BillingState as TEXT),\n cast(billing_state as TEXT))\n as billing_state,\n \n\n\n coalesce(cast(BillingStateCode as TEXT),\n cast(billing_state_code as TEXT))\n as billing_state_code,\n \n\n\n coalesce(cast(BillingStreet as TEXT),\n cast(billing_street as TEXT))\n as billing_street,\n \n\n\n cast(Description as TEXT) as account_description,\n \n\n\n cast(Id as TEXT) as account_id,\n \n\n\n cast(Industry as TEXT) as industry,\n \n\n\n coalesce(cast(IsDeleted as boolean),\n cast(is_deleted as boolean))\n as is_deleted,\n \n\n\n coalesce(cast(LastActivityDate as timestamp),\n cast(last_activity_date as timestamp))\n as last_activity_date,\n \n\n\n coalesce(cast(LastReferencedDate as timestamp),\n cast(last_referenced_date as timestamp))\n as last_referenced_date,\n \n\n\n coalesce(cast(LastViewedDate as timestamp),\n cast(last_viewed_date as timestamp))\n as last_viewed_date,\n \n\n\n coalesce(cast(MasterRecordId as TEXT),\n cast(master_record_id as TEXT))\n as master_record_id,\n \n\n\n cast(Name as TEXT) as account_name,\n \n\n\n coalesce(cast(NumberOfEmployees as integer),\n cast(number_of_employees as integer))\n as number_of_employees,\n \n\n\n coalesce(cast(OwnerId as TEXT),\n cast(owner_id as TEXT))\n as owner_id,\n \n\n\n cast(Ownership as TEXT) as ownership,\n \n\n\n coalesce(cast(ParentId as TEXT),\n cast(parent_id as TEXT))\n as parent_id,\n \n\n\n cast(Rating as TEXT) as rating,\n \n\n\n coalesce(cast(RecordTypeId as TEXT),\n cast(record_type_id as TEXT))\n as record_type_id,\n \n\n\n coalesce(cast(ShippingCity as TEXT),\n cast(shipping_city as TEXT))\n as shipping_city,\n \n\n\n coalesce(cast(ShippingCountry as TEXT),\n cast(shipping_country as TEXT))\n as shipping_country,\n \n\n\n coalesce(cast(ShippingCountryCode as TEXT),\n cast(shipping_country_code as TEXT))\n as shipping_country_code,\n \n\n\n coalesce(cast(ShippingPostalCode as TEXT),\n cast(shipping_postal_code as TEXT))\n as shipping_postal_code,\n \n\n\n coalesce(cast(ShippingState as TEXT),\n cast(shipping_state as TEXT))\n as shipping_state,\n \n\n\n coalesce(cast(ShippingStateCode as TEXT),\n cast(shipping_state_code as TEXT))\n as shipping_state_code,\n \n\n\n coalesce(cast(ShippingStreet as TEXT),\n cast(shipping_street as TEXT))\n as shipping_street,\n \n\n\n cast(Type as TEXT) as type,\n \n\n\n cast(Website as TEXT) as website\n\n \n\n\n\n\n\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__lead": {"database": "postgres", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__lead", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__lead.sql", "original_file_path": "models/salesforce/stg_salesforce__lead.sql", "unique_id": "model.salesforce_source.stg_salesforce__lead", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__lead"], "alias": "stg_salesforce__lead", "checksum": {"name": "sha256", "checksum": "867419072e95b386d8e9eaa44a3ca5eb64ebc18b95268f6f530cea23d4b662cb"}, "config": {"enabled": true, "alias": null, "schema": "salesforce_source_dev", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": 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": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Represents a prospect or lead.", "columns": {"lead_id": {"name": "lead_id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "annual_revenue": {"name": "annual_revenue", "description": "Annual revenue for the lead\u2019s company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "city": {"name": "city", "description": "City for the lead\u2019s address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "company": {"name": "company", "description": "Required. The lead\u2019s company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "converted_account_id": {"name": "converted_account_id", "description": "Object reference ID that points to the account into which the lead converted. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "converted_contact_id": {"name": "converted_contact_id", "description": "Object reference ID that points to the contact into which the lead converted. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "converted_date": {"name": "converted_date", "description": "Date on which this lead was converted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "converted_opportunity_id": {"name": "converted_opportunity_id", "description": "Object reference ID that points to the opportunity into which the lead has been converted. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "country": {"name": "country", "description": "The lead\u2019s country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "country_code": {"name": "country_code", "description": "The ISO country code for the lead\u2019s address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_description": {"name": "lead_description", "description": "The lead\u2019s description.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "The lead\u2019s email address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email_bounced_date": {"name": "email_bounced_date", "description": "If bounce management is activated and an email sent to the lead bounced, the date and time of the bounce.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email_bounced_reason": {"name": "email_bounced_reason", "description": "If bounce management is activated and an email sent to the lead bounced, the reason for the bounce.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fax": {"name": "fax", "description": "The lead\u2019s fax number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The lead\u2019s first name up to 40 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_opted_out_of_email": {"name": "has_opted_out_of_email", "description": "Indicates whether the lead doesn\u2019t want to receive email from Salesforce (true) or does (false). Label is Email Opt Out.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "individual_id": {"name": "individual_id", "description": "ID of the data privacy record associated with this lead. This field is available if you enabled Data Protection and Privacy in Setup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "industry": {"name": "industry", "description": "Industry in which the lead works.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_converted": {"name": "is_converted", "description": "Indicates whether the lead has been converted (true) or not (false). Label is Converted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_unread_by_owner": {"name": "is_unread_by_owner", "description": "If true, lead has been assigned, but not yet viewed. See Unread Leads for more information. Label is Unread By Owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "jigsaw_contact_id": {"name": "jigsaw_contact_id", "description": "Jigsaw Contact ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "'Value is the most recent of either: Due date of the most recent event logged against the record. Due date of the most recently closed task associated with the record.'\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "Required. Last name of the lead up to 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Used with Longitude to specify the precise geolocation of an address. Acceptable values are numbers between \u201390 and 90 up to 15 decimal places.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_source": {"name": "lead_source", "description": "The lead\u2019s source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Used with Latitude to specify the precise geolocation of an address. Acceptable values are numbers between \u2013180 and 180 up to 15 decimal places.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "master_record_id": {"name": "master_record_id", "description": "If this record was deleted as the result of a merge, this field contains the ID of the record that was kept. If this record was deleted for any other reason, or has not been deleted, the value is null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mobile_phone": {"name": "mobile_phone", "description": "The lead\u2019s mobile phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_name": {"name": "lead_name", "description": "Concatenation of FirstName, MiddleName, LastName, and Suffix up to 203 characters, including whitespaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "number_of_employees": {"name": "number_of_employees", "description": "Number of employees at the lead\u2019s company. Label is Employees.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "ID of the lead\u2019s owner. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "phone": {"name": "phone", "description": "The lead\u2019s phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "photo_url": {"name": "photo_url", "description": "Path to be combined with the URL of a Salesforce instance", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "postal_code": {"name": "postal_code", "description": "Postal code for the address of the lead. Label is Zip/Postal Code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "salutation": {"name": "salutation", "description": "Salutation for the lead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "state": {"name": "state", "description": "State for the address of the lead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "state_code": {"name": "state_code", "description": "The ISO state code for the lead\u2019s address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"name": "status", "description": "Status code for this converted lead. Status codes are defined in Status and represented in the API by the LeadStatus object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "street": {"name": "street", "description": "Street number and name for the address of the lead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "system_modstamp": {"name": "system_modstamp", "description": "System Modstamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "title": {"name": "title", "description": "Title for the lead, such as CFO or CEO.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "website": {"name": "website", "description": "Website for the lead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "unrendered_config": {"materialized": "table", "enabled": true, "schema": "salesforce_source_{{ var('directed_schema','dev') }}"}, "created_at": 1720574246.366612, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__lead\"", "raw_code": "--To disable this model, set the salesforce__lead_enabled within your dbt_project.yml file to False.\n{{ config(enabled=var('salesforce__lead_enabled', True)) }}\n\n{% set lead_column_list = get_lead_columns() -%}\n{% set lead_dict = column_list_to_dict(lead_column_list) -%}\n\nwith fields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','lead')),\n staging_columns=lead_column_list\n )\n }}\n \n from {{ source('salesforce','lead') }}\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n {{ salesforce_source.coalesce_rename(\"id\", lead_dict, alias=\"lead_id\") }},\n {{ salesforce_source.coalesce_rename(\"annual_revenue\", lead_dict, datatype=dbt.type_numeric()) }},\n {{ salesforce_source.coalesce_rename(\"city\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"company\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"converted_account_id\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"converted_contact_id\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"converted_date\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"converted_opportunity_id\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"country\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"country_code\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"created_by_id\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"created_date\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"description\", lead_dict, alias=\"lead_description\") }},\n {{ salesforce_source.coalesce_rename(\"email\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"email_bounced_date\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"email_bounced_reason\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"first_name\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"has_opted_out_of_email\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"individual_id\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"industry\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"is_converted\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"is_deleted\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"is_unread_by_owner\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_activity_date\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_modified_by_id\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_modified_date\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_name\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_referenced_date\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_viewed_date\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"lead_source\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"master_record_id\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"mobile_phone\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"name\", lead_dict, alias=\"lead_name\") }},\n {{ salesforce_source.coalesce_rename(\"number_of_employees\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"owner_id\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"phone\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"postal_code\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"state\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"state_code\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"status\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"street\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"title\", lead_dict) }},\n {{ salesforce_source.coalesce_rename(\"website\", lead_dict) }}\n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__lead_pass_through_columns') }}\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "language": "sql", "refs": [], "sources": [["salesforce", "lead"], ["salesforce", "lead"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_lead_columns", "macro.salesforce_source.column_list_to_dict", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.salesforce_source.coalesce_rename", "macro.dbt.type_numeric", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["source.salesforce_source.salesforce.lead"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__lead.sql", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__lead_enabled within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n annual_revenue\n \n as \n \n annual_revenue\n \n, \n \n \n city\n \n as \n \n city\n \n, \n \n \n company\n \n as \n \n company\n \n, \n \n \n converted_account_id\n \n as \n \n converted_account_id\n \n, \n \n \n converted_contact_id\n \n as \n \n converted_contact_id\n \n, \n \n \n converted_date\n \n as \n \n converted_date\n \n, \n \n \n converted_opportunity_id\n \n as \n \n converted_opportunity_id\n \n, \n \n \n country\n \n as \n \n country\n \n, \n \n \n country_code\n \n as \n \n country_code\n \n, \n \n \n created_by_id\n \n as \n \n created_by_id\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n email\n \n as \n \n email\n \n, \n \n \n email_bounced_date\n \n as \n \n email_bounced_date\n \n, \n \n \n email_bounced_reason\n \n as \n \n email_bounced_reason\n \n, \n \n \n first_name\n \n as \n \n first_name\n \n, \n \n \n has_opted_out_of_email\n \n as \n \n has_opted_out_of_email\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n individual_id\n \n as \n \n individual_id\n \n, \n \n \n industry\n \n as \n \n industry\n \n, \n \n \n is_converted\n \n as \n \n is_converted\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n is_unread_by_owner\n \n as \n \n is_unread_by_owner\n \n, \n \n \n last_activity_date\n \n as \n \n last_activity_date\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n last_name\n \n as \n \n last_name\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n lead_source\n \n as \n \n lead_source\n \n, \n \n \n master_record_id\n \n as \n \n master_record_id\n \n, \n \n \n mobile_phone\n \n as \n \n mobile_phone\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n number_of_employees\n \n as \n \n number_of_employees\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n phone\n \n as \n \n phone\n \n, \n \n \n postal_code\n \n as \n \n postal_code\n \n, \n \n \n state\n \n as \n \n state\n \n, \n \n \n state_code\n \n as \n \n state_code\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n street\n \n as \n \n street\n \n, \n \n \n title\n \n as \n \n title\n \n, \n \n \n website\n \n as \n \n website\n \n, \n cast(null as float) as \n \n AnnualRevenue\n \n , \n cast(null as TEXT) as \n \n ConvertedAccountId\n \n , \n cast(null as TEXT) as \n \n ConvertedContactId\n \n , \n cast(null as timestamp) as \n \n ConvertedDate\n \n , \n cast(null as TEXT) as \n \n ConvertedOpportunityId\n \n , \n cast(null as TEXT) as \n \n CountryCode\n \n , \n cast(null as TEXT) as \n \n CreatedById\n \n , \n cast(null as timestamp) as \n \n CreatedDate\n \n , \n cast(null as timestamp) as \n \n EmailBouncedDate\n \n , \n cast(null as TEXT) as \n \n EmailBouncedReason\n \n , \n cast(null as TEXT) as \n \n FirstName\n \n , \n cast(null as boolean) as \n \n HasOptedOutOfEmail\n \n , \n cast(null as TEXT) as \n \n IndividualId\n \n , \n cast(null as boolean) as \n \n IsConverted\n \n , \n cast(null as boolean) as \n \n IsDeleted\n \n , \n cast(null as boolean) as \n \n IsUnreadByOwner\n \n , \n cast(null as timestamp) as \n \n LastActivityDate\n \n , \n cast(null as TEXT) as \n \n LastModifiedById\n \n , \n cast(null as timestamp) as \n \n LastModifiedDate\n \n , \n cast(null as TEXT) as \n \n LastName\n \n , \n cast(null as timestamp) as \n \n LastReferencedDate\n \n , \n cast(null as timestamp) as \n \n LastViewedDate\n \n , \n cast(null as TEXT) as \n \n LeadSource\n \n , \n cast(null as TEXT) as \n \n MasterRecordId\n \n , \n cast(null as TEXT) as \n \n MobilePhone\n \n , \n cast(null as integer) as \n \n NumberOfEmployees\n \n , \n cast(null as TEXT) as \n \n OwnerId\n \n , \n cast(null as TEXT) as \n \n PostalCode\n \n , \n cast(null as TEXT) as \n \n StateCode\n \n \n\n\n \n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_lead_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n cast(Id as TEXT) as lead_id,\n \n\n\n coalesce(cast(AnnualRevenue as numeric(28,6)),\n cast(annual_revenue as numeric(28,6)))\n as annual_revenue,\n \n\n\n cast(City as TEXT) as city,\n \n\n\n cast(Company as TEXT) as company,\n \n\n\n coalesce(cast(ConvertedAccountId as TEXT),\n cast(converted_account_id as TEXT))\n as converted_account_id,\n \n\n\n coalesce(cast(ConvertedContactId as TEXT),\n cast(converted_contact_id as TEXT))\n as converted_contact_id,\n \n\n\n coalesce(cast(ConvertedDate as timestamp),\n cast(converted_date as timestamp))\n as converted_date,\n \n\n\n coalesce(cast(ConvertedOpportunityId as TEXT),\n cast(converted_opportunity_id as TEXT))\n as converted_opportunity_id,\n \n\n\n cast(Country as TEXT) as country,\n \n\n\n coalesce(cast(CountryCode as TEXT),\n cast(country_code as TEXT))\n as country_code,\n \n\n\n coalesce(cast(CreatedById as TEXT),\n cast(created_by_id as TEXT))\n as created_by_id,\n \n\n\n coalesce(cast(CreatedDate as timestamp),\n cast(created_date as timestamp))\n as created_date,\n \n\n\n cast(Description as TEXT) as lead_description,\n \n\n\n cast(Email as TEXT) as email,\n \n\n\n coalesce(cast(EmailBouncedDate as timestamp),\n cast(email_bounced_date as timestamp))\n as email_bounced_date,\n \n\n\n coalesce(cast(EmailBouncedReason as TEXT),\n cast(email_bounced_reason as TEXT))\n as email_bounced_reason,\n \n\n\n coalesce(cast(FirstName as TEXT),\n cast(first_name as TEXT))\n as first_name,\n \n\n\n coalesce(cast(HasOptedOutOfEmail as boolean),\n cast(has_opted_out_of_email as boolean))\n as has_opted_out_of_email,\n \n\n\n coalesce(cast(IndividualId as TEXT),\n cast(individual_id as TEXT))\n as individual_id,\n \n\n\n cast(Industry as TEXT) as industry,\n \n\n\n coalesce(cast(IsConverted as boolean),\n cast(is_converted as boolean))\n as is_converted,\n \n\n\n coalesce(cast(IsDeleted as boolean),\n cast(is_deleted as boolean))\n as is_deleted,\n \n\n\n coalesce(cast(IsUnreadByOwner as boolean),\n cast(is_unread_by_owner as boolean))\n as is_unread_by_owner,\n \n\n\n coalesce(cast(LastActivityDate as timestamp),\n cast(last_activity_date as timestamp))\n as last_activity_date,\n \n\n\n coalesce(cast(LastModifiedById as TEXT),\n cast(last_modified_by_id as TEXT))\n as last_modified_by_id,\n \n\n\n coalesce(cast(LastModifiedDate as timestamp),\n cast(last_modified_date as timestamp))\n as last_modified_date,\n \n\n\n coalesce(cast(LastName as TEXT),\n cast(last_name as TEXT))\n as last_name,\n \n\n\n coalesce(cast(LastReferencedDate as timestamp),\n cast(last_referenced_date as timestamp))\n as last_referenced_date,\n \n\n\n coalesce(cast(LastViewedDate as timestamp),\n cast(last_viewed_date as timestamp))\n as last_viewed_date,\n \n\n\n coalesce(cast(LeadSource as TEXT),\n cast(lead_source as TEXT))\n as lead_source,\n \n\n\n coalesce(cast(MasterRecordId as TEXT),\n cast(master_record_id as TEXT))\n as master_record_id,\n \n\n\n coalesce(cast(MobilePhone as TEXT),\n cast(mobile_phone as TEXT))\n as mobile_phone,\n \n\n\n cast(Name as TEXT) as lead_name,\n \n\n\n coalesce(cast(NumberOfEmployees as integer),\n cast(number_of_employees as integer))\n as number_of_employees,\n \n\n\n coalesce(cast(OwnerId as TEXT),\n cast(owner_id as TEXT))\n as owner_id,\n \n\n\n cast(Phone as TEXT) as phone,\n \n\n\n coalesce(cast(PostalCode as TEXT),\n cast(postal_code as TEXT))\n as postal_code,\n \n\n\n cast(State as TEXT) as state,\n \n\n\n coalesce(cast(StateCode as TEXT),\n cast(state_code as TEXT))\n as state_code,\n \n\n\n cast(Status as TEXT) as status,\n \n\n\n cast(Street as TEXT) as street,\n \n\n\n cast(Title as TEXT) as title,\n \n\n\n cast(Website as TEXT) as website\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__order": {"database": "postgres", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__order", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__order.sql", "original_file_path": "models/salesforce/stg_salesforce__order.sql", "unique_id": "model.salesforce_source.stg_salesforce__order", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__order"], "alias": "stg_salesforce__order", "checksum": {"name": "sha256", "checksum": "ee9f01ed785776c82f439babc5854f6bc9aa1e12387636c6fe4d85b51aafced0"}, "config": {"enabled": true, "alias": null, "schema": "salesforce_source_dev", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": 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": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Represents an order associated with a contract or an account.", "columns": {"order_id": {"name": "order_id", "description": "order id", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "Required. ID of the Account associated with this order. Can only be updated when the order\u2019s StatusCode value is Draft. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "activated_by_id": {"name": "activated_by_id", "description": "ID of the User who activated this order. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "activated_date": {"name": "activated_date", "description": "Date and time when the order was activated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_city": {"name": "billing_city", "description": "City for the billing address for this order. Maximum size is 40 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_country": {"name": "billing_country", "description": "Country for the billing address for this order. Maximum size is 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_country_code": {"name": "billing_country_code", "description": "ISO country code for the billing address for this order.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_geocode_accuracy": {"name": "billing_geocode_accuracy", "description": "Accuracy level of the geocode of the address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_postal_code": {"name": "billing_postal_code", "description": "Postal code for the billing address for this order. Maximum size is 20 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_state": {"name": "billing_state", "description": "State for the billing address for this order. Maximum size is 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_state_code": {"name": "billing_state_code", "description": "ISO state code for the order\u2019s billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_street": {"name": "billing_street", "description": "Street address for the billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "contract_id": {"name": "contract_id", "description": "ID of the contract associated with this order. Can only be updated when the order\u2019s StatusCode value is Draft. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "order_description": {"name": "order_description", "description": "Description of the order.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "end_date": {"name": "end_date", "description": "Date at which the order ends. Label is Order End Date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_id": {"name": "opportunity_id", "description": "ID for the opportunity that\u2019s associated with this order.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "order_number": {"name": "order_number", "description": "Order number assigned to this order (not the unique, system-generated ID assigned during creation). Maximum size is 30 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "original_order_id": {"name": "original_order_id", "description": "Optional. ID of the original order that a reduction order is reducing, if the reduction order is reducing a single order. Label is Original Order. Editable only if isReductionOrder is true. If the reduction order is reducing more than one order, leave blank. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "Required. ID of the User or queue that owns this order. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "pricebook_2_id": {"name": "pricebook_2_id", "description": "Required. ID of the price book associated with this order. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_city": {"name": "shipping_city", "description": "City of the shipping address. Maximum size is 40 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_country": {"name": "shipping_country", "description": "Country of the shipping address. Maximum size is 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_country_code": {"name": "shipping_country_code", "description": "ISO country code for the order\u2019s shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_geocode_accuracy": {"name": "shipping_geocode_accuracy", "description": "Accuracy level of the geocode of the shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_postal_code": {"name": "shipping_postal_code", "description": "Postal code of the shipping address. Maximum size is 20 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_state": {"name": "shipping_state", "description": "State of the shipping address. Maximum size is 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_state_code": {"name": "shipping_state_code", "description": "ISO state code for the order\u2019s shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_street": {"name": "shipping_street", "description": "Street address of the shipping address. Maximum of 255 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"name": "status", "description": "Picklist of values that indicate order status. Each value is within one of two status categories defined in StatusCode. For example, the status picklist might contain Draft, Ready for Review, and Ready for Activation values with a StatusCode of Draft.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_code": {"name": "status_code", "description": "The status category for the order. An order can be either Draft or Activated. Label is Status Category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "total_amount": {"name": "total_amount", "description": "The total amount for the order products associated with this order. This field is available in API v48.0 and later.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "If you want to show more information about your order, you can add custom values to the Type picklist. By default, the Type field doesn't perform any actions or show any values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "unrendered_config": {"materialized": "table", "enabled": true, "schema": "salesforce_source_{{ var('directed_schema','dev') }}"}, "created_at": 1720574246.37225, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__order\"", "raw_code": "--To disable this model, set the salesforce__order_enabled within your dbt_project.yml file to False.\n{{ config(enabled=var('salesforce__order_enabled', True)) }}\n\n{% set order_column_list = get_order_columns() -%}\n{% set order_dict = column_list_to_dict(order_column_list) -%}\n\nwith fields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','order')),\n staging_columns=order_column_list\n )\n }}\n \n from {{ source('salesforce','order') }}\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n {{ salesforce_source.coalesce_rename(\"id\", order_dict, alias=\"order_id\") }},\n {{ salesforce_source.coalesce_rename(\"account_id\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"activated_by_id\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"activated_date\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"billing_city\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"billing_country\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"billing_country_code\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"billing_postal_code\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"billing_state\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"billing_state_code\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"billing_street\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"contract_id\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"created_by_id\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"created_date\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"description\", order_dict, alias=\"order_description\") }},\n {{ salesforce_source.coalesce_rename(\"end_date\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"is_deleted\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_modified_by_id\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_modified_date\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_referenced_date\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_viewed_date\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"opportunity_id\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"order_number\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"original_order_id\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"owner_id\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"pricebook_2_id\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"shipping_city\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"shipping_country\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"shipping_country_code\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"shipping_postal_code\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"shipping_state\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"shipping_state_code\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"shipping_street\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"status\", order_dict) }},\n {{ salesforce_source.coalesce_rename(\"total_amount\", order_dict, datatype=dbt.type_numeric()) }},\n {{ salesforce_source.coalesce_rename(\"type\", order_dict) }}\n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__order_pass_through_columns') }}\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "language": "sql", "refs": [], "sources": [["salesforce", "order"], ["salesforce", "order"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_order_columns", "macro.salesforce_source.column_list_to_dict", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.salesforce_source.coalesce_rename", "macro.dbt.type_numeric", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["source.salesforce_source.salesforce.order"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__order.sql", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__order_enabled within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n account_id\n \n as \n \n account_id\n \n, \n \n \n activated_by_id\n \n as \n \n activated_by_id\n \n, \n \n \n activated_date\n \n as \n \n activated_date\n \n, \n \n \n billing_city\n \n as \n \n billing_city\n \n, \n \n \n billing_country\n \n as \n \n billing_country\n \n, \n \n \n billing_country_code\n \n as \n \n billing_country_code\n \n, \n \n \n billing_postal_code\n \n as \n \n billing_postal_code\n \n, \n \n \n billing_state\n \n as \n \n billing_state\n \n, \n \n \n billing_state_code\n \n as \n \n billing_state_code\n \n, \n \n \n billing_street\n \n as \n \n billing_street\n \n, \n \n \n contract_id\n \n as \n \n contract_id\n \n, \n \n \n created_by_id\n \n as \n \n created_by_id\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n end_date\n \n as \n \n end_date\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n opportunity_id\n \n as \n \n opportunity_id\n \n, \n \n \n order_number\n \n as \n \n order_number\n \n, \n \n \n original_order_id\n \n as \n \n original_order_id\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n pricebook_2_id\n \n as \n \n pricebook_2_id\n \n, \n \n \n shipping_city\n \n as \n \n shipping_city\n \n, \n \n \n shipping_country\n \n as \n \n shipping_country\n \n, \n \n \n shipping_country_code\n \n as \n \n shipping_country_code\n \n, \n \n \n shipping_postal_code\n \n as \n \n shipping_postal_code\n \n, \n \n \n shipping_state\n \n as \n \n shipping_state\n \n, \n \n \n shipping_state_code\n \n as \n \n shipping_state_code\n \n, \n \n \n shipping_street\n \n as \n \n shipping_street\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n total_amount\n \n as \n \n total_amount\n \n, \n \n \n type\n \n as \n \n type\n \n, \n cast(null as TEXT) as \n \n AccountId\n \n , \n cast(null as TEXT) as \n \n ActivatedById\n \n , \n cast(null as timestamp) as \n \n ActivatedDate\n \n , \n cast(null as TEXT) as \n \n BillingCity\n \n , \n cast(null as TEXT) as \n \n BillingCountry\n \n , \n cast(null as TEXT) as \n \n BillingCountryCode\n \n , \n cast(null as TEXT) as \n \n BillingPostalCode\n \n , \n cast(null as TEXT) as \n \n BillingState\n \n , \n cast(null as TEXT) as \n \n BillingStateCode\n \n , \n cast(null as TEXT) as \n \n BillingStreet\n \n , \n cast(null as TEXT) as \n \n ContractId\n \n , \n cast(null as TEXT) as \n \n CreatedById\n \n , \n cast(null as timestamp) as \n \n CreatedDate\n \n , \n cast(null as timestamp) as \n \n EndDate\n \n , \n cast(null as boolean) as \n \n IsDeleted\n \n , \n cast(null as TEXT) as \n \n LastModifiedById\n \n , \n cast(null as timestamp) as \n \n LastModifiedDate\n \n , \n cast(null as timestamp) as \n \n LastReferencedDate\n \n , \n cast(null as timestamp) as \n \n LastViewedDate\n \n , \n cast(null as TEXT) as \n \n OpportunityId\n \n , \n cast(null as TEXT) as \n \n OrderNumber\n \n , \n cast(null as TEXT) as \n \n OriginalOrderId\n \n , \n cast(null as TEXT) as \n \n OwnerId\n \n , \n cast(null as TEXT) as \n \n Pricebook2Id\n \n , \n cast(null as TEXT) as \n \n ShippingCity\n \n , \n cast(null as TEXT) as \n \n ShippingCountry\n \n , \n cast(null as TEXT) as \n \n ShippingCountryCode\n \n , \n cast(null as TEXT) as \n \n ShippingPostalCode\n \n , \n cast(null as TEXT) as \n \n ShippingState\n \n , \n cast(null as TEXT) as \n \n ShippingStateCode\n \n , \n cast(null as TEXT) as \n \n ShippingStreet\n \n , \n cast(null as float) as \n \n TotalAmount\n \n \n\n\n \n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_order_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n cast(Id as TEXT) as order_id,\n \n\n\n coalesce(cast(AccountId as TEXT),\n cast(account_id as TEXT))\n as account_id,\n \n\n\n coalesce(cast(ActivatedById as TEXT),\n cast(activated_by_id as TEXT))\n as activated_by_id,\n \n\n\n coalesce(cast(ActivatedDate as timestamp),\n cast(activated_date as timestamp))\n as activated_date,\n \n\n\n coalesce(cast(BillingCity as TEXT),\n cast(billing_city as TEXT))\n as billing_city,\n \n\n\n coalesce(cast(BillingCountry as TEXT),\n cast(billing_country as TEXT))\n as billing_country,\n \n\n\n coalesce(cast(BillingCountryCode as TEXT),\n cast(billing_country_code as TEXT))\n as billing_country_code,\n \n\n\n coalesce(cast(BillingPostalCode as TEXT),\n cast(billing_postal_code as TEXT))\n as billing_postal_code,\n \n\n\n coalesce(cast(BillingState as TEXT),\n cast(billing_state as TEXT))\n as billing_state,\n \n\n\n coalesce(cast(BillingStateCode as TEXT),\n cast(billing_state_code as TEXT))\n as billing_state_code,\n \n\n\n coalesce(cast(BillingStreet as TEXT),\n cast(billing_street as TEXT))\n as billing_street,\n \n\n\n coalesce(cast(ContractId as TEXT),\n cast(contract_id as TEXT))\n as contract_id,\n \n\n\n coalesce(cast(CreatedById as TEXT),\n cast(created_by_id as TEXT))\n as created_by_id,\n \n\n\n coalesce(cast(CreatedDate as timestamp),\n cast(created_date as timestamp))\n as created_date,\n \n\n\n cast(Description as TEXT) as order_description,\n \n\n\n coalesce(cast(EndDate as timestamp),\n cast(end_date as timestamp))\n as end_date,\n \n\n\n coalesce(cast(IsDeleted as boolean),\n cast(is_deleted as boolean))\n as is_deleted,\n \n\n\n coalesce(cast(LastModifiedById as TEXT),\n cast(last_modified_by_id as TEXT))\n as last_modified_by_id,\n \n\n\n coalesce(cast(LastModifiedDate as timestamp),\n cast(last_modified_date as timestamp))\n as last_modified_date,\n \n\n\n coalesce(cast(LastReferencedDate as timestamp),\n cast(last_referenced_date as timestamp))\n as last_referenced_date,\n \n\n\n coalesce(cast(LastViewedDate as timestamp),\n cast(last_viewed_date as timestamp))\n as last_viewed_date,\n \n\n\n coalesce(cast(OpportunityId as TEXT),\n cast(opportunity_id as TEXT))\n as opportunity_id,\n \n\n\n coalesce(cast(OrderNumber as TEXT),\n cast(order_number as TEXT))\n as order_number,\n \n\n\n coalesce(cast(OriginalOrderId as TEXT),\n cast(original_order_id as TEXT))\n as original_order_id,\n \n\n\n coalesce(cast(OwnerId as TEXT),\n cast(owner_id as TEXT))\n as owner_id,\n \n\n\n coalesce(cast(Pricebook2Id as TEXT),\n cast(pricebook_2_id as TEXT))\n as pricebook_2_id,\n \n\n\n coalesce(cast(ShippingCity as TEXT),\n cast(shipping_city as TEXT))\n as shipping_city,\n \n\n\n coalesce(cast(ShippingCountry as TEXT),\n cast(shipping_country as TEXT))\n as shipping_country,\n \n\n\n coalesce(cast(ShippingCountryCode as TEXT),\n cast(shipping_country_code as TEXT))\n as shipping_country_code,\n \n\n\n coalesce(cast(ShippingPostalCode as TEXT),\n cast(shipping_postal_code as TEXT))\n as shipping_postal_code,\n \n\n\n coalesce(cast(ShippingState as TEXT),\n cast(shipping_state as TEXT))\n as shipping_state,\n \n\n\n coalesce(cast(ShippingStateCode as TEXT),\n cast(shipping_state_code as TEXT))\n as shipping_state_code,\n \n\n\n coalesce(cast(ShippingStreet as TEXT),\n cast(shipping_street as TEXT))\n as shipping_street,\n \n\n\n cast(Status as TEXT) as status,\n \n\n\n coalesce(cast(TotalAmount as numeric(28,6)),\n cast(total_amount as numeric(28,6)))\n as total_amount,\n \n\n\n cast(Type as TEXT) as type\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__event": {"database": "postgres", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__event", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__event.sql", "original_file_path": "models/salesforce/stg_salesforce__event.sql", "unique_id": "model.salesforce_source.stg_salesforce__event", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__event"], "alias": "stg_salesforce__event", "checksum": {"name": "sha256", "checksum": "4090ea3da4f9d2f147a91f5ad3ee6ca97d212dba350b887a3e770dc295817fe5"}, "config": {"enabled": true, "alias": null, "schema": "salesforce_source_dev", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": 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": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Represents an event in the calendar. In the user interface, event and task records are collectively referred to as activities.", "columns": {"event_id": {"name": "event_id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "Represents the ID of the related account. The AccountId is determined as follows. If the value of WhatId is any of the following objects, then Salesforce uses that object\u2019s AccountId.\nAccount Opportunity Contract Custom object that is a child of Account If the value of the WhatId field is any other object, and the value of the WhoId field is a contact object, then Salesforce uses that contact\u2019s AccountId. (If your org uses Shared Activities, Salesforce uses the AccountId of the primary contact.)\nOtherwise, Salesforce sets the value of the AccountId field to null.\nFor information on IDs, see ID Field Type.\nThis is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "activity_date": {"name": "activity_date", "description": "Contains the event\u2019s due date if the IsAllDayEvent flag is set to true. This field is a date field with a timestamp that is always set to midnight in the Coordinated Universal Time (UTC) time zone. Don\u2019t attempt to alter the timestamp to account for time zone differences. Label is Due Date Only. This field is required in versions 12.0 and earlier if the IsAllDayEvent flag is set to true.\nThe value for this field and StartDateTime must match, or one of them must be null.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "activity_date_time": {"name": "activity_date_time", "description": "Contains the event\u2019s due date if the IsAllDayEvent flag is set to false. The time portion of this field is always transferred in the Coordinated Universal Time (UTC) time zone. Translate the time portion to or from a local time zone for the user or the application, as appropriate. Label is Due Date Time. This field is required in versions 12.0 and earlier if the IsAllDayEvent flag is set to false.\nThe value for this field and StartDateTime must match, or one of them must be null.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "event_description": {"name": "event_description", "description": "Contains a text description of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "duration_in_minutes": {"name": "duration_in_minutes", "description": "Contains the event length, in minutes\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "end_date": {"name": "end_date", "description": "Read-only. Available in versions 46.0 and later. This field supplies the date value that appears in the EndDateTime field. This field is a date field with a timestamp that is always set to midnight in the Coordinated Universal Time (UTC) time zone.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "end_date_time": {"name": "end_date_time", "description": "Available in versions 13.0 and later. The time portion of this field is always transferred in the Coordinated Universal Time (UTC) time zone. Translate the time portion to or from a local time zone for the user or the application, as appropriate.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "event_subtype": {"name": "event_subtype", "description": "Provides standard subtypes to facilitate creating and searching for events. This field isn\u2019t updateable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "group_event_type": {"name": "group_event_type", "description": "Group Event Type", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_archived": {"name": "is_archived", "description": "Indicates whether the event has been archived.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_child": {"name": "is_child", "description": "Indicates whether the event is a child of another event (true) or not (false). For a child event, you can update IsReminderSet and ReminderDateTime only. You can query and delete a child event. If the objects related to the child event are different from those objects related to the parent event (this difference is possible if you use API version 25.0 or earlier) and one of the objects related to the child event is deleted, the objects related to the parent event are updated to ensure data integrity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_group_event": {"name": "is_group_event", "description": "Indicates whether the event is a group event\u2014that is, whether it has invitees (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_recurrence": {"name": "is_recurrence", "description": "Indicates whether a Salesforce Classic event is scheduled to repeat itself (true) or only occurs one time (false). This field is read-only when updating records, but not when creating them. If this field value is true, then RecurrenceEndDateOnly, RecurrenceStartDateTime, RecurrenceType, and any recurrence fields associated with the given recurrence type must be populated. Label is Create recurring series of events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "location": {"name": "location", "description": "Contains the location of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "Contains the ID of the user or public calendar who owns the event. Label is Assigned to ID. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "start_date_time": {"name": "start_date_time", "description": "Indicates the start date and time of the event. Available in versions 13.0 and later.\nIf this field has a value, then ActivityDate and ActivityDateTime must either be null or match the value of this field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "subject": {"name": "subject", "description": "The subject line of the event, such as Call, Email, or Meeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "Indicates the event type, such as Call, Email, or Meeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "what_count": {"name": "what_count", "description": "Available if your organization has enabled Shared Activities. Represents the count of related EventRelations pertaining to the WhatId. The count of the WhatId must be 1 or less.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "what_id": {"name": "what_id", "description": "The WhatId represents nonhuman objects such as accounts, opportunities, campaigns, cases, or custom objects. WhatIds are polymorphic. Polymorphic means a WhatId is equivalent to the ID of a related object. The label is Related To ID. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "who_count": {"name": "who_count", "description": "Available to organizations that have Shared Activities enabled. Represents the count of related EventRelations pertaining to the WhoId.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "who_id": {"name": "who_id", "description": "The WhoId represents a human such as a lead or a contact. WhoIds are polymorphic. Polymorphic means a WhoId is equivalent to a contact\u2019s ID or a lead\u2019s ID. The label is Name ID.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "unrendered_config": {"materialized": "table", "enabled": true, "schema": "salesforce_source_{{ var('directed_schema','dev') }}"}, "created_at": 1720574246.362856, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__event\"", "raw_code": "--To disable this model, set the salesforce__event_enabled variable within your dbt_project.yml file to False.\n{{ config(enabled=var('salesforce__event_enabled', True)) }}\n\n{% set event_column_list = get_event_columns() -%}\n{% set event_dict = column_list_to_dict(event_column_list) -%}\n\nwith fields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','event')),\n staging_columns=event_column_list\n )\n }}\n\n from {{ source('salesforce','event') }}\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n {{ salesforce_source.coalesce_rename(\"id\", event_dict, alias=\"event_id\") }},\n {{ salesforce_source.coalesce_rename(\"account_id\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"activity_date\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"activity_date_time\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"created_by_id\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"created_date\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"description\", event_dict, alias=\"event_description\") }},\n {{ salesforce_source.coalesce_rename(\"end_date\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"end_date_time\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"event_subtype\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"group_event_type\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"is_archived\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"is_child\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"is_deleted\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"is_group_event\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"is_recurrence\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_modified_by_id\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_modified_date\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"location\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"owner_id\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"start_date_time\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"subject\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"type\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"what_count\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"what_id\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"who_count\", event_dict) }},\n {{ salesforce_source.coalesce_rename(\"who_id\", event_dict) }}\n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__event_pass_through_columns') }}\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "language": "sql", "refs": [], "sources": [["salesforce", "event"], ["salesforce", "event"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_event_columns", "macro.salesforce_source.column_list_to_dict", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.salesforce_source.coalesce_rename", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["source.salesforce_source.salesforce.event"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__event.sql", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__event_enabled variable within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n account_id\n \n as \n \n account_id\n \n, \n \n \n activity_date\n \n as \n \n activity_date\n \n, \n \n \n activity_date_time\n \n as \n \n activity_date_time\n \n, \n \n \n created_by_id\n \n as \n \n created_by_id\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n end_date\n \n as \n \n end_date\n \n, \n \n \n end_date_time\n \n as \n \n end_date_time\n \n, \n \n \n event_subtype\n \n as \n \n event_subtype\n \n, \n \n \n group_event_type\n \n as \n \n group_event_type\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_archived\n \n as \n \n is_archived\n \n, \n \n \n is_child\n \n as \n \n is_child\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n is_group_event\n \n as \n \n is_group_event\n \n, \n \n \n is_recurrence\n \n as \n \n is_recurrence\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n location\n \n as \n \n location\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n start_date_time\n \n as \n \n start_date_time\n \n, \n \n \n subject\n \n as \n \n subject\n \n, \n \n \n type\n \n as \n \n type\n \n, \n \n \n what_count\n \n as \n \n what_count\n \n, \n \n \n what_id\n \n as \n \n what_id\n \n, \n \n \n who_count\n \n as \n \n who_count\n \n, \n \n \n who_id\n \n as \n \n who_id\n \n, \n cast(null as TEXT) as \n \n AccountId\n \n , \n cast(null as timestamp) as \n \n ActivityDate\n \n , \n cast(null as timestamp) as \n \n ActivityDateTime\n \n , \n cast(null as TEXT) as \n \n CreatedById\n \n , \n cast(null as timestamp) as \n \n CreatedDate\n \n , \n cast(null as timestamp) as \n \n EndDate\n \n , \n cast(null as timestamp) as \n \n EndDateTime\n \n , \n cast(null as TEXT) as \n \n EventSubtype\n \n , \n cast(null as TEXT) as \n \n GroupEventType\n \n , \n cast(null as boolean) as \n \n IsArchived\n \n , \n cast(null as boolean) as \n \n IsChild\n \n , \n cast(null as boolean) as \n \n IsDeleted\n \n , \n cast(null as boolean) as \n \n IsGroupEvent\n \n , \n cast(null as boolean) as \n \n IsRecurrence\n \n , \n cast(null as TEXT) as \n \n LastModifiedById\n \n , \n cast(null as timestamp) as \n \n LastModifiedDate\n \n , \n cast(null as TEXT) as \n \n OwnerId\n \n , \n cast(null as timestamp) as \n \n StartDateTime\n \n , \n cast(null as integer) as \n \n WhatCount\n \n , \n cast(null as TEXT) as \n \n WhatId\n \n , \n cast(null as integer) as \n \n WhoCount\n \n , \n cast(null as TEXT) as \n \n WhoId\n \n \n\n\n\n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_event_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n cast(Id as TEXT) as event_id,\n \n\n\n coalesce(cast(AccountId as TEXT),\n cast(account_id as TEXT))\n as account_id,\n \n\n\n coalesce(cast(ActivityDate as timestamp),\n cast(activity_date as timestamp))\n as activity_date,\n \n\n\n coalesce(cast(ActivityDateTime as timestamp),\n cast(activity_date_time as timestamp))\n as activity_date_time,\n \n\n\n coalesce(cast(CreatedById as TEXT),\n cast(created_by_id as TEXT))\n as created_by_id,\n \n\n\n coalesce(cast(CreatedDate as timestamp),\n cast(created_date as timestamp))\n as created_date,\n \n\n\n cast(Description as TEXT) as event_description,\n \n\n\n coalesce(cast(EndDate as timestamp),\n cast(end_date as timestamp))\n as end_date,\n \n\n\n coalesce(cast(EndDateTime as timestamp),\n cast(end_date_time as timestamp))\n as end_date_time,\n \n\n\n coalesce(cast(EventSubtype as TEXT),\n cast(event_subtype as TEXT))\n as event_subtype,\n \n\n\n coalesce(cast(GroupEventType as TEXT),\n cast(group_event_type as TEXT))\n as group_event_type,\n \n\n\n coalesce(cast(IsArchived as boolean),\n cast(is_archived as boolean))\n as is_archived,\n \n\n\n coalesce(cast(IsChild as boolean),\n cast(is_child as boolean))\n as is_child,\n \n\n\n coalesce(cast(IsDeleted as boolean),\n cast(is_deleted as boolean))\n as is_deleted,\n \n\n\n coalesce(cast(IsGroupEvent as boolean),\n cast(is_group_event as boolean))\n as is_group_event,\n \n\n\n coalesce(cast(IsRecurrence as boolean),\n cast(is_recurrence as boolean))\n as is_recurrence,\n \n\n\n coalesce(cast(LastModifiedById as TEXT),\n cast(last_modified_by_id as TEXT))\n as last_modified_by_id,\n \n\n\n coalesce(cast(LastModifiedDate as timestamp),\n cast(last_modified_date as timestamp))\n as last_modified_date,\n \n\n\n cast(Location as TEXT) as location,\n \n\n\n coalesce(cast(OwnerId as TEXT),\n cast(owner_id as TEXT))\n as owner_id,\n \n\n\n coalesce(cast(StartDateTime as timestamp),\n cast(start_date_time as timestamp))\n as start_date_time,\n \n\n\n cast(Subject as TEXT) as subject,\n \n\n\n cast(Type as TEXT) as type,\n \n\n\n coalesce(cast(WhatCount as integer),\n cast(what_count as integer))\n as what_count,\n \n\n\n coalesce(cast(WhatId as TEXT),\n cast(what_id as TEXT))\n as what_id,\n \n\n\n coalesce(cast(WhoCount as integer),\n cast(who_count as integer))\n as who_count,\n \n\n\n coalesce(cast(WhoId as TEXT),\n cast(who_id as TEXT))\n as who_id\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__product_2": {"database": "postgres", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__product_2", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__product_2.sql", "original_file_path": "models/salesforce/stg_salesforce__product_2.sql", "unique_id": "model.salesforce_source.stg_salesforce__product_2", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__product_2"], "alias": "stg_salesforce__product_2", "checksum": {"name": "sha256", "checksum": "68f349725a82724226dd7e9bf1df25db2d507777024610ac74f41b1fb66205c4"}, "config": {"enabled": true, "alias": null, "schema": "salesforce_source_dev", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": 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": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Represents a product that your company sells.", "columns": {"product_2_id": {"name": "product_2_id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "product_2_description": {"name": "product_2_description", "description": "A text description of this record. Label is Product Description.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "display_url": {"name": "display_url", "description": "URL leading to a specific version of a record in the linked external data source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "external_data_source_id": {"name": "external_data_source_id", "description": "ID of the related external data source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "external_id": {"name": "external_id", "description": "The unique identifier of a record in the linked external data source. For example, ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "family": {"name": "family", "description": "Name of the product family associated with this record. Product families are configured as picklists in the user interface. To obtain a list of valid values, call describeSObjects() and process the DescribeSObjectResult for the values associated with the Family field. Label is Product Family.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_active": {"name": "is_active", "description": "Indicates whether this record is active (true) or not (false). Inactive Product2 records are hidden in many areas in the user interface. You can change the IsActive flag on a Product2 object as often as necessary. Label is Active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_archived": {"name": "is_archived", "description": "Describes whether the product is archived. The default value is false.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "product_2_name": {"name": "product_2_name", "description": "Required. Default name of this record. Label is Product Name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "number_of_quantity_installments": {"name": "number_of_quantity_installments", "description": "If the product has a quantity schedule, the number of installments.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "number_of_revenue_installments": {"name": "number_of_revenue_installments", "description": "If the product has a revenue schedule, the number of installments.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "product_code": {"name": "product_code", "description": "Default product code for this record. Your org defines the product code naming pattern.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "quantity_installment_period": {"name": "quantity_installment_period", "description": "If the product has a quantity schedule, the amount of time covered by the schedule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "quantity_schedule_type": {"name": "quantity_schedule_type", "description": "The type of the quantity schedule, if the product has one.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "quantity_unit_of_measure": {"name": "quantity_unit_of_measure", "description": "Unit of the product; for example, kilograms, liters, or cases. This field comes with only one value, Each, so consider creating your own. The QuantityUnitOfMeasure field on ProductItem inherits this field\u2019s values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "revenue_installment_period": {"name": "revenue_installment_period", "description": "If the product has a revenue schedule, the time period covered by the schedule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "revenue_schedule_type": {"name": "revenue_schedule_type", "description": "The type of the revenue schedule, if the product has one.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "stock_keeping_unit": {"name": "stock_keeping_unit", "description": "The SKU for the product. Use in tandem with or instead of the ProductCode field. For example, you can track the manufacturer\u2019s identifying code in the Product Code field and assign the product a SKU when you resell it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "system_modstamp": {"name": "system_modstamp", "description": "System Modstamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "unrendered_config": {"materialized": "table", "enabled": true, "schema": "salesforce_source_{{ var('directed_schema','dev') }}"}, "created_at": 1720574246.375131, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__product_2\"", "raw_code": "--To disable this model, set the salesforce__product_2_enabled variable within your dbt_project.yml file to False.\n{{ config(enabled=var('salesforce__product_2_enabled', True)) }}\n\n{% set product_2_column_list = get_product_2_columns() -%}\n{% set product_2_dict = column_list_to_dict(product_2_column_list) -%}\n\nwith fields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','product_2')),\n staging_columns=product_2_column_list\n )\n }}\n \n from {{ source('salesforce','product_2') }}\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n {{ salesforce_source.coalesce_rename(\"id\", product_2_dict, alias=\"product_2_id\") }},\n {{ salesforce_source.coalesce_rename(\"created_by_id\", product_2_dict) }},\n {{ salesforce_source.coalesce_rename(\"created_date\", product_2_dict) }},\n {{ salesforce_source.coalesce_rename(\"description\", product_2_dict, alias=\"product_2_description\") }},\n {{ salesforce_source.coalesce_rename(\"display_url\", product_2_dict) }},\n {{ salesforce_source.coalesce_rename(\"external_id\", product_2_dict) }},\n {{ salesforce_source.coalesce_rename(\"family\", product_2_dict) }},\n {{ salesforce_source.coalesce_rename(\"is_active\", product_2_dict) }},\n {{ salesforce_source.coalesce_rename(\"is_archived\", product_2_dict) }},\n {{ salesforce_source.coalesce_rename(\"is_deleted\", product_2_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_modified_by_id\", product_2_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_modified_date\", product_2_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_referenced_date\", product_2_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_viewed_date\", product_2_dict) }},\n {{ salesforce_source.coalesce_rename(\"name\", product_2_dict, alias=\"product_2_name\") }},\n {{ salesforce_source.coalesce_rename(\"number_of_quantity_installments\", product_2_dict) }},\n {{ salesforce_source.coalesce_rename(\"number_of_revenue_installments\", product_2_dict) }},\n {{ salesforce_source.coalesce_rename(\"product_code\", product_2_dict) }},\n {{ salesforce_source.coalesce_rename(\"quantity_installment_period\", product_2_dict) }},\n {{ salesforce_source.coalesce_rename(\"quantity_schedule_type\", product_2_dict) }},\n {{ salesforce_source.coalesce_rename(\"quantity_unit_of_measure\", product_2_dict) }},\n {{ salesforce_source.coalesce_rename(\"record_type_id\", product_2_dict) }},\n {{ salesforce_source.coalesce_rename(\"revenue_installment_period\", product_2_dict) }},\n {{ salesforce_source.coalesce_rename(\"revenue_schedule_type\", product_2_dict) }}\n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__product_2_pass_through_columns') }}\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "language": "sql", "refs": [], "sources": [["salesforce", "product_2"], ["salesforce", "product_2"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_product_2_columns", "macro.salesforce_source.column_list_to_dict", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.salesforce_source.coalesce_rename", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["source.salesforce_source.salesforce.product_2"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__product_2.sql", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__product_2_enabled variable within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n created_by_id\n \n as \n \n created_by_id\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n display_url\n \n as \n \n display_url\n \n, \n \n \n external_id\n \n as \n \n external_id\n \n, \n \n \n family\n \n as \n \n family\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_active\n \n as \n \n is_active\n \n, \n \n \n is_archived\n \n as \n \n is_archived\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n number_of_quantity_installments\n \n as \n \n number_of_quantity_installments\n \n, \n \n \n number_of_revenue_installments\n \n as \n \n number_of_revenue_installments\n \n, \n \n \n product_code\n \n as \n \n product_code\n \n, \n \n \n quantity_installment_period\n \n as \n \n quantity_installment_period\n \n, \n \n \n quantity_schedule_type\n \n as \n \n quantity_schedule_type\n \n, \n \n \n quantity_unit_of_measure\n \n as \n \n quantity_unit_of_measure\n \n, \n \n \n record_type_id\n \n as \n \n record_type_id\n \n, \n \n \n revenue_installment_period\n \n as \n \n revenue_installment_period\n \n, \n \n \n revenue_schedule_type\n \n as \n \n revenue_schedule_type\n \n, \n cast(null as TEXT) as \n \n CreatedById\n \n , \n cast(null as timestamp) as \n \n CreatedDate\n \n , \n cast(null as TEXT) as \n \n DisplayUrl\n \n , \n cast(null as TEXT) as \n \n ExternalId\n \n , \n cast(null as boolean) as \n \n IsActive\n \n , \n cast(null as boolean) as \n \n IsArchived\n \n , \n cast(null as boolean) as \n \n IsDeleted\n \n , \n cast(null as TEXT) as \n \n LastModifiedById\n \n , \n cast(null as timestamp) as \n \n LastModifiedDate\n \n , \n cast(null as timestamp) as \n \n LastReferencedDate\n \n , \n cast(null as timestamp) as \n \n LastViewedDate\n \n , \n cast(null as integer) as \n \n NumberOfQuantityInstallments\n \n , \n cast(null as integer) as \n \n NumberOfRevenueInstallments\n \n , \n cast(null as TEXT) as \n \n ProductCode\n \n , \n cast(null as TEXT) as \n \n QuantityInstallmentPeriod\n \n , \n cast(null as TEXT) as \n \n QuantityScheduleType\n \n , \n cast(null as TEXT) as \n \n QuantityUnitOfMeasure\n \n , \n cast(null as TEXT) as \n \n RecordTypeId\n \n , \n cast(null as TEXT) as \n \n RevenueInstallmentPeriod\n \n , \n cast(null as TEXT) as \n \n RevenueScheduleType\n \n \n\n\n \n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_product_2_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n cast(Id as TEXT) as product_2_id,\n \n\n\n coalesce(cast(CreatedById as TEXT),\n cast(created_by_id as TEXT))\n as created_by_id,\n \n\n\n coalesce(cast(CreatedDate as timestamp),\n cast(created_date as timestamp))\n as created_date,\n \n\n\n cast(Description as TEXT) as product_2_description,\n \n\n\n coalesce(cast(DisplayUrl as TEXT),\n cast(display_url as TEXT))\n as display_url,\n \n\n\n coalesce(cast(ExternalId as TEXT),\n cast(external_id as TEXT))\n as external_id,\n \n\n\n cast(Family as TEXT) as family,\n \n\n\n coalesce(cast(IsActive as boolean),\n cast(is_active as boolean))\n as is_active,\n \n\n\n coalesce(cast(IsArchived as boolean),\n cast(is_archived as boolean))\n as is_archived,\n \n\n\n coalesce(cast(IsDeleted as boolean),\n cast(is_deleted as boolean))\n as is_deleted,\n \n\n\n coalesce(cast(LastModifiedById as TEXT),\n cast(last_modified_by_id as TEXT))\n as last_modified_by_id,\n \n\n\n coalesce(cast(LastModifiedDate as timestamp),\n cast(last_modified_date as timestamp))\n as last_modified_date,\n \n\n\n coalesce(cast(LastReferencedDate as timestamp),\n cast(last_referenced_date as timestamp))\n as last_referenced_date,\n \n\n\n coalesce(cast(LastViewedDate as timestamp),\n cast(last_viewed_date as timestamp))\n as last_viewed_date,\n \n\n\n cast(Name as TEXT) as product_2_name,\n \n\n\n coalesce(cast(NumberOfQuantityInstallments as integer),\n cast(number_of_quantity_installments as integer))\n as number_of_quantity_installments,\n \n\n\n coalesce(cast(NumberOfRevenueInstallments as integer),\n cast(number_of_revenue_installments as integer))\n as number_of_revenue_installments,\n \n\n\n coalesce(cast(ProductCode as TEXT),\n cast(product_code as TEXT))\n as product_code,\n \n\n\n coalesce(cast(QuantityInstallmentPeriod as TEXT),\n cast(quantity_installment_period as TEXT))\n as quantity_installment_period,\n \n\n\n coalesce(cast(QuantityScheduleType as TEXT),\n cast(quantity_schedule_type as TEXT))\n as quantity_schedule_type,\n \n\n\n coalesce(cast(QuantityUnitOfMeasure as TEXT),\n cast(quantity_unit_of_measure as TEXT))\n as quantity_unit_of_measure,\n \n\n\n coalesce(cast(RecordTypeId as TEXT),\n cast(record_type_id as TEXT))\n as record_type_id,\n \n\n\n coalesce(cast(RevenueInstallmentPeriod as TEXT),\n cast(revenue_installment_period as TEXT))\n as revenue_installment_period,\n \n\n\n coalesce(cast(RevenueScheduleType as TEXT),\n cast(revenue_schedule_type as TEXT))\n as revenue_schedule_type\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__opportunity_line_item": {"database": "postgres", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__opportunity_line_item", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__opportunity_line_item.sql", "original_file_path": "models/salesforce/stg_salesforce__opportunity_line_item.sql", "unique_id": "model.salesforce_source.stg_salesforce__opportunity_line_item", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__opportunity_line_item"], "alias": "stg_salesforce__opportunity_line_item", "checksum": {"name": "sha256", "checksum": "b40c0c11b6cbb4683706b9e9bfe23f7bb59a7607089f855239877172ab7fbd0b"}, "config": {"enabled": true, "alias": null, "schema": "salesforce_source_dev", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": 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": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Represents an opportunity line item, which is a member of the list of Product2 products associated with an Opportunity.", "columns": {"opportunity_line_item_id": {"name": "opportunity_line_item_id", "description": "Line Item ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_line_item_description": {"name": "opportunity_line_item_description", "description": "Text description of the opportunity line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "discount": {"name": "discount", "description": "Discount for the product as a percentage. When updating these records: If you specify Discount without specifying TotalPrice, the TotalPrice is adjusted to accommodate the new Discount value, and the UnitPrice is held constant. If you specify both Discount and Quantity, you must also specify either TotalPrice or UnitPrice so the system knows which one to automatically adjust.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_quantity_schedule": {"name": "has_quantity_schedule", "description": "Read-only. Indicates whether a quantity schedule has been created for this object (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_revenue_schedule": {"name": "has_revenue_schedule", "description": "Indicates whether a revenue schedule has been created for this object (true) or not (false). If this object has a revenue schedule, the Quantity and TotalPrice fields can\u2019t be updated. In addition, the Quantity field can\u2019t be updated if this object has a quantity schedule. Update requests aren\u2019t rejected but the updated values are ignored.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_schedule": {"name": "has_schedule", "description": "If either HasQuantitySchedule or HasRevenueSchedule is true, this field is also true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp for when the current user last viewed a record related to this record. Available in API version 50.0 and later.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced (LastReferencedDate) and not viewed. Available in API version 50.0 and later.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "list_price": {"name": "list_price", "description": "Corresponds to the UnitPrice on the PricebookEntry that is associated with this line item, which can be in the standard price book or a custom price book. A client application can use this information to show whether the unit price (or sales price) of the line item differs from the price book entry list price.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_line_item_name": {"name": "opportunity_line_item_name", "description": "The opportunity line item name (known as \u201cOpportunity Product\u201d in the user interface). This read-only field is available in API version 30.0 and later.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_id": {"name": "opportunity_id", "description": "Required. ID of the associated Opportunity. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "pricebook_entry_id": {"name": "pricebook_entry_id", "description": "Required. ID of the associated PricebookEntry. Exists only for those organizations that have Products enabled as a feature. In API versions 1.0 and 2.0, you can specify values for either this field or ProductId, but not both. For this reason, both fields are declared nillable. In API version 3.0 and later, you must specify values for this field instead of ProductId. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "product_2_id": {"name": "product_2_id", "description": "The ID of the related Product2 record. This is a read-only field available in API version 30.0 and later. Use the PricebookEntryId field instead, specifying the ID of the PricebookEntry record.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "product_code": {"name": "product_code", "description": "This read-only field is available in API version 30.0 and later. It references the value in the ProductCode field of the related Product2 record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "Read-only if this record has a quantity schedule, a revenue schedule, or both a quantity and a revenue schedule. When updating these records: If you specify Quantity without specifying the UnitPrice, the UnitPrice value will be adjusted to accommodate the new Quantity value, and the TotalPrice will be held constant. If you specify both Discount and Quantity, you must also specify either TotalPrice or UnitPrice so the system can determine which one to automatically adjust.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "service_date": {"name": "service_date", "description": "Date when the product revenue will be recognized and the product quantity will be shipped. Opportunity Close Date\u2014ServiceDate is ignored. Product Date\u2014ServiceDate is used if not null. Schedule Date\u2014ServiceDate is used if not null and there are no revenue schedules present for this line item, that is, there are no OpportunityLineItemSchedule records with a field Type value of Revenue that are children of this record.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sort_order": {"name": "sort_order", "description": "Number indicating the sort order selected by the user. Client applications can use this to match the sort order in Salesforce.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "This field is available only for backward compatibility. It represents the total price of the OpportunityLineItem. If you do not specify UnitPrice, this field is required. If you specify Discount and Quantity, this field or UnitPrice is required. When updating these records, you can change either this value or the UnitPrice, but not both at the same time.\nThis field is nullable, but you can\u2019t set both TotalPrice and UnitPrice to null in the same update request. To insert the TotalPrice via the API (given only a unit price and the quantity), calculate this field as the unit price multiplied by the quantity. This field is read-only if the opportunity line item has a revenue schedule. If the opportunity line item does not have a schedule or only has quantity schedule, this field can be updated.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "unit_price": {"name": "unit_price", "description": "The unit price for the opportunity line item. In the Salesforce user interface, this field\u2019s value is calculated by dividing the total price of the opportunity line item by the quantity listed for that line item. Label is Sales Price. This field or TotalPrice is required. You can\u2019t specify both.\nIf you specify Discount and Quantity, this field or TotalPrice is required.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "unrendered_config": {"materialized": "table", "enabled": true, "schema": "salesforce_source_{{ var('directed_schema','dev') }}"}, "created_at": 1720574246.369813, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__opportunity_line_item\"", "raw_code": "--To disable this model, set the salesforce__opportunity_line_item_enabled variable within your dbt_project.yml file to False.\n{{ config(enabled=var('salesforce__opportunity_line_item_enabled', True)) }}\n\n{% set opportunity_line_item_column_list = get_opportunity_line_item_columns() -%}\n{% set opportunity_line_item_dict = column_list_to_dict(opportunity_line_item_column_list) -%}\n\nwith fields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','opportunity_line_item')),\n staging_columns=opportunity_line_item_column_list\n )\n }}\n \n from {{ source('salesforce','opportunity_line_item') }}\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n {{ salesforce_source.coalesce_rename(\"id\", opportunity_line_item_dict, alias=\"opportunity_line_item_id\") }},\n {{ salesforce_source.coalesce_rename(\"created_by_id\", opportunity_line_item_dict) }},\n {{ salesforce_source.coalesce_rename(\"created_date\", opportunity_line_item_dict) }},\n {{ salesforce_source.coalesce_rename(\"description\", opportunity_line_item_dict, alias=\"opportunity_line_item_description\") }},\n {{ salesforce_source.coalesce_rename(\"discount\", opportunity_line_item_dict) }},\n {{ salesforce_source.coalesce_rename(\"has_quantity_schedule\", opportunity_line_item_dict) }},\n {{ salesforce_source.coalesce_rename(\"has_revenue_schedule\", opportunity_line_item_dict) }},\n {{ salesforce_source.coalesce_rename(\"has_schedule\", opportunity_line_item_dict) }},\n {{ salesforce_source.coalesce_rename(\"is_deleted\", opportunity_line_item_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_modified_by_id\", opportunity_line_item_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_modified_date\", opportunity_line_item_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_referenced_date\", opportunity_line_item_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_viewed_date\", opportunity_line_item_dict) }},\n {{ salesforce_source.coalesce_rename(\"list_price\", opportunity_line_item_dict, datatype=dbt.type_numeric()) }},\n {{ salesforce_source.coalesce_rename(\"name\", opportunity_line_item_dict, alias=\"opportunity_line_item_name\") }},\n {{ salesforce_source.coalesce_rename(\"opportunity_id\", opportunity_line_item_dict) }},\n {{ salesforce_source.coalesce_rename(\"pricebook_entry_id\", opportunity_line_item_dict) }},\n {{ salesforce_source.coalesce_rename(\"product_2_id\", opportunity_line_item_dict) }},\n {{ salesforce_source.coalesce_rename(\"product_code\", opportunity_line_item_dict) }},\n {{ salesforce_source.coalesce_rename(\"quantity\", opportunity_line_item_dict) }},\n {{ salesforce_source.coalesce_rename(\"service_date\", opportunity_line_item_dict) }},\n {{ salesforce_source.coalesce_rename(\"sort_order\", opportunity_line_item_dict) }},\n {{ salesforce_source.coalesce_rename(\"total_price\", opportunity_line_item_dict, datatype=dbt.type_numeric()) }},\n {{ salesforce_source.coalesce_rename(\"unit_price\", opportunity_line_item_dict, datatype=dbt.type_numeric()) }}\n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__opportunity_line_item_pass_through_columns') }}\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "language": "sql", "refs": [], "sources": [["salesforce", "opportunity_line_item"], ["salesforce", "opportunity_line_item"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_opportunity_line_item_columns", "macro.salesforce_source.column_list_to_dict", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.salesforce_source.coalesce_rename", "macro.dbt.type_numeric", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["source.salesforce_source.salesforce.opportunity_line_item"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__opportunity_line_item.sql", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__opportunity_line_item_enabled variable within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n created_by_id\n \n as \n \n created_by_id\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n discount\n \n as \n \n discount\n \n, \n \n \n has_quantity_schedule\n \n as \n \n has_quantity_schedule\n \n, \n \n \n has_revenue_schedule\n \n as \n \n has_revenue_schedule\n \n, \n \n \n has_schedule\n \n as \n \n has_schedule\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n list_price\n \n as \n \n list_price\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n opportunity_id\n \n as \n \n opportunity_id\n \n, \n \n \n pricebook_entry_id\n \n as \n \n pricebook_entry_id\n \n, \n \n \n product_2_id\n \n as \n \n product_2_id\n \n, \n \n \n product_code\n \n as \n \n product_code\n \n, \n \n \n quantity\n \n as \n \n quantity\n \n, \n \n \n service_date\n \n as \n \n service_date\n \n, \n \n \n sort_order\n \n as \n \n sort_order\n \n, \n \n \n total_price\n \n as \n \n total_price\n \n, \n \n \n unit_price\n \n as \n \n unit_price\n \n, \n cast(null as TEXT) as \n \n CreatedById\n \n , \n cast(null as timestamp) as \n \n CreatedDate\n \n , \n cast(null as boolean) as \n \n HasQuantitySchedule\n \n , \n cast(null as boolean) as \n \n HasRevenueSchedule\n \n , \n cast(null as boolean) as \n \n HasSchedule\n \n , \n cast(null as boolean) as \n \n IsDeleted\n \n , \n cast(null as TEXT) as \n \n LastModifiedById\n \n , \n cast(null as timestamp) as \n \n LastModifiedDate\n \n , \n cast(null as timestamp) as \n \n LastReferencedDate\n \n , \n cast(null as timestamp) as \n \n LastViewedDate\n \n , \n cast(null as float) as \n \n ListPrice\n \n , \n cast(null as TEXT) as \n \n OpportunityId\n \n , \n cast(null as TEXT) as \n \n PricebookEntryId\n \n , \n cast(null as TEXT) as \n \n Product2Id\n \n , \n cast(null as TEXT) as \n \n ProductCode\n \n , \n cast(null as timestamp) as \n \n ServiceDate\n \n , \n cast(null as integer) as \n \n SortOrder\n \n , \n cast(null as float) as \n \n TotalPrice\n \n , \n cast(null as float) as \n \n UnitPrice\n \n \n\n\n \n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_opportunity_line_item_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n cast(Id as TEXT) as opportunity_line_item_id,\n \n\n\n coalesce(cast(CreatedById as TEXT),\n cast(created_by_id as TEXT))\n as created_by_id,\n \n\n\n coalesce(cast(CreatedDate as timestamp),\n cast(created_date as timestamp))\n as created_date,\n \n\n\n cast(Description as TEXT) as opportunity_line_item_description,\n \n\n\n cast(Discount as float) as discount,\n \n\n\n coalesce(cast(HasQuantitySchedule as boolean),\n cast(has_quantity_schedule as boolean))\n as has_quantity_schedule,\n \n\n\n coalesce(cast(HasRevenueSchedule as boolean),\n cast(has_revenue_schedule as boolean))\n as has_revenue_schedule,\n \n\n\n coalesce(cast(HasSchedule as boolean),\n cast(has_schedule as boolean))\n as has_schedule,\n \n\n\n coalesce(cast(IsDeleted as boolean),\n cast(is_deleted as boolean))\n as is_deleted,\n \n\n\n coalesce(cast(LastModifiedById as TEXT),\n cast(last_modified_by_id as TEXT))\n as last_modified_by_id,\n \n\n\n coalesce(cast(LastModifiedDate as timestamp),\n cast(last_modified_date as timestamp))\n as last_modified_date,\n \n\n\n coalesce(cast(LastReferencedDate as timestamp),\n cast(last_referenced_date as timestamp))\n as last_referenced_date,\n \n\n\n coalesce(cast(LastViewedDate as timestamp),\n cast(last_viewed_date as timestamp))\n as last_viewed_date,\n \n\n\n coalesce(cast(ListPrice as numeric(28,6)),\n cast(list_price as numeric(28,6)))\n as list_price,\n \n\n\n cast(Name as TEXT) as opportunity_line_item_name,\n \n\n\n coalesce(cast(OpportunityId as TEXT),\n cast(opportunity_id as TEXT))\n as opportunity_id,\n \n\n\n coalesce(cast(PricebookEntryId as TEXT),\n cast(pricebook_entry_id as TEXT))\n as pricebook_entry_id,\n \n\n\n coalesce(cast(Product2Id as TEXT),\n cast(product_2_id as TEXT))\n as product_2_id,\n \n\n\n coalesce(cast(ProductCode as TEXT),\n cast(product_code as TEXT))\n as product_code,\n \n\n\n cast(Quantity as float) as quantity,\n \n\n\n coalesce(cast(ServiceDate as timestamp),\n cast(service_date as timestamp))\n as service_date,\n \n\n\n coalesce(cast(SortOrder as integer),\n cast(sort_order as integer))\n as sort_order,\n \n\n\n coalesce(cast(TotalPrice as numeric(28,6)),\n cast(total_price as numeric(28,6)))\n as total_price,\n \n\n\n coalesce(cast(UnitPrice as numeric(28,6)),\n cast(unit_price as numeric(28,6)))\n as unit_price\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__user": {"database": "postgres", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__user", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__user.sql", "original_file_path": "models/salesforce/stg_salesforce__user.sql", "unique_id": "model.salesforce_source.stg_salesforce__user", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__user"], "alias": "stg_salesforce__user", "checksum": {"name": "sha256", "checksum": "d5b32139fbe202d94bf64b4720ed0cc1247d916dc76e4121043a950ed5c0c005"}, "config": {"enabled": true, "alias": null, "schema": "salesforce_source_dev", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": 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": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Represents a user in your organization.", "columns": {"user_id": {"name": "user_id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "True, if this field has been deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "about_me": {"name": "about_me", "description": "Information about the user, such as areas of interest or skills.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "ID of the Account associated with a Customer Portal user. This field is null for Salesforce users.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "alias": {"name": "alias", "description": "Required. The user\u2019s alias. For example, jsmith.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "badge_text": {"name": "badge_text", "description": "The community role, displayed on the user profile page just below the user name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "banner_photo_url": {"name": "banner_photo_url", "description": "The URL for the user's banner photo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "call_center_id": {"name": "call_center_id", "description": "If Salesforce CRM Call Center is enabled, represents the call center to which this user is assigned.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "city": {"name": "city", "description": "The city associated with the user. Up to 40 characters allowed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "community_nickname": {"name": "community_nickname", "description": "Name used to identify this user in the Community application, which includes the ideas and answers features.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "company_name": {"name": "company_name", "description": "The name of the user\u2019s company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "contact_id": {"name": "contact_id", "description": "ID of the Contact associated with this account. The contact must have a value in the AccountId field or an error occurs.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "country": {"name": "country", "description": "The country associated with the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "country_code": {"name": "country_code", "description": "The ISO country code associated with the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "default_group_notification_frequency": {"name": "default_group_notification_frequency", "description": "The default frequency for sending the user's Chatter group email notifications when the user joins groups.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "delegated_approver_id": {"name": "delegated_approver_id", "description": "Id of the user who is a delegated approver for this user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "department": {"name": "department", "description": "The company department associated with the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "digest_frequency": {"name": "digest_frequency", "description": "The frequency at which the system sends the user\u2019s Chatter personal email digest.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "division": {"name": "division", "description": "The division associated with this user, similar to Department and unrelated to DefaultDivision.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "Required. The user\u2019s email address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email_encoding_key": {"name": "email_encoding_key", "description": "Required. The email encoding for the user, such as ISO-8859-1 or UTF-8.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email_preferences_auto_bcc": {"name": "email_preferences_auto_bcc", "description": "Determines whether the user receives copies of sent emails. This option applies only if compliance BCC emails are not enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "employee_number": {"name": "employee_number", "description": "The user\u2019s employee number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "extension": {"name": "extension", "description": "The user\u2019s phone extension number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fax": {"name": "fax", "description": "The user\u2019s fax number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "federation_identifier": {"name": "federation_identifier", "description": "Indicates the value that must be listed in the Subject element of a Security Assertion Markup Language (SAML) IDP certificate to authenticate the user for a client application using single sign-on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The user\u2019s first name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_enabled": {"name": "forecast_enabled", "description": "Indicates whether the user is enabled as a forecast manager (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "full_photo_url": {"name": "full_photo_url", "description": "The URL for the user's profile photo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "geocode_accuracy": {"name": "geocode_accuracy", "description": "The level of accuracy of a location\u2019s geographical coordinates compared with its physical address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "individual_id": {"name": "individual_id", "description": "ID of the data privacy record associated with this user. This field is available if Data Protection and Privacy is enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_active": {"name": "is_active", "description": "Indicates whether the user has access to log in (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_profile_photo_active": {"name": "is_profile_photo_active", "description": "Indicates whether a user has a profile photo (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "language_locale_key": {"name": "language_locale_key", "description": "Required. The user\u2019s language, such as \u201cFrench\u201d or \u201cChinese (Traditional).\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_login_date": {"name": "last_login_date", "description": "The date and time when the user last successfully logged in. This value is updated if 60 seconds have elapsed since the user\u2019s last login.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "Required. The user\u2019s last name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp for when the current user last viewed a record related to this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced (LastReferencedDate) and not viewed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Used with Longitude to specify the precise geolocation of an address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "locale_sid_key": {"name": "locale_sid_key", "description": "Required. This field is a restricted picklist field. The value of the field affects formatting and parsing of values, especially numeric values, in the user interface.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Used with Latitude to specify the precise geolocation of an address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "manager_id": {"name": "manager_id", "description": "The Id of the user who manages this user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "medium_banner_photo_url": {"name": "medium_banner_photo_url", "description": "The URL for the medium-sized user profile banner photo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mobile_phone": {"name": "mobile_phone", "description": "The user\u2019s mobile or cellular phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "user_name": {"name": "user_name", "description": "Concatenation of FirstName and LastName.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "offline_trial_expiration_date": {"name": "offline_trial_expiration_date", "description": "The date and time when the user\u2019s Connect Offline trial expires.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "phone": {"name": "phone", "description": "The user\u2019s phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "postal_code": {"name": "postal_code", "description": "The user\u2019s postal or ZIP code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "profile_id": {"name": "profile_id", "description": "Required. ID of the user\u2019s Profile. Use this value to cache metadata based on profile. In earlier releases, this was RoleId.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "receives_admin_info_emails": {"name": "receives_admin_info_emails", "description": "Indicates whether the user receives email for administrators from Salesforce (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "receives_info_emails": {"name": "receives_info_emails", "description": "Indicates whether the user receives informational email from Salesforce (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sender_email": {"name": "sender_email", "description": "The email address used as the From address when the user sends emails. This address is the same value shown in Setup on the My Email Settings page.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sender_name": {"name": "sender_name", "description": "The name used as the email sender when the user sends emails. This name is the same value shown in Setup on the My Email Settings page.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "signature": {"name": "signature", "description": "The signature text added to emails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "small_banner_photo_url": {"name": "small_banner_photo_url", "description": "The URL for the small user profile banner photo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "small_photo_url": {"name": "small_photo_url", "description": "The URL for a thumbnail of the user's profile photo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "state": {"name": "state", "description": "The state associated with the User.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "state_code": {"name": "state_code", "description": "The ISO state code associated with the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "street": {"name": "street", "description": "The street address associated with the User.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_zone_sid_key": {"name": "time_zone_sid_key", "description": "Required. This field is a restricted picklist field. A User time zone affects the offset used when displaying or entering times in the user interface.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "title": {"name": "title", "description": "The user\u2019s business title, such as \u201cVice President.\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "username": {"name": "username", "description": "Contains the name that a user enters to log in. The value for this field must be in the form of an email address, using all lowercase characters. It must also be unique across all organizations.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "user_role_id": {"name": "user_role_id", "description": "ID of the user\u2019s UserRole.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "user_type": {"name": "user_type", "description": "The category of user license.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "unrendered_config": {"materialized": "table", "schema": "salesforce_source_{{ var('directed_schema','dev') }}"}, "created_at": 1720574246.355799, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__user\"", "raw_code": "{% set user_column_list = get_user_columns() -%}\n{% set user_dict = column_list_to_dict(user_column_list) -%}\n\nwith fields as (\n\n select\n\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','user')),\n staging_columns=user_column_list\n )\n }}\n\n from {{ source('salesforce','user') }}\n), \n\nfinal as (\n \n select \n _fivetran_deleted,\n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n {{ salesforce_source.coalesce_rename(\"account_id\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"alias\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"city\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"company_name\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"contact_id\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"country\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"country_code\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"department\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"email\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"first_name\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"id\", user_dict, alias=\"user_id\" ) }},\n {{ salesforce_source.coalesce_rename(\"individual_id\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"is_active\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"last_login_date\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"last_name\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"last_referenced_date\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"last_viewed_date\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"manager_id\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"name\", user_dict, alias=\"user_name\" ) }},\n {{ salesforce_source.coalesce_rename(\"postal_code\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"profile_id\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"state\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"state_code\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"street\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"title\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"user_role_id\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"user_type\", user_dict ) }},\n {{ salesforce_source.coalesce_rename(\"username\", user_dict ) }}\n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__user_pass_through_columns') }}\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect * \nfrom final", "language": "sql", "refs": [], "sources": [["salesforce", "user"], ["salesforce", "user"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_user_columns", "macro.salesforce_source.column_list_to_dict", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.salesforce_source.coalesce_rename", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["source.salesforce_source.salesforce.user"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__user.sql", "compiled": true, "compiled_code": "with fields as (\n\n select\n\n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n account_id\n \n as \n \n account_id\n \n, \n \n \n alias\n \n as \n \n alias\n \n, \n \n \n city\n \n as \n \n city\n \n, \n \n \n company_name\n \n as \n \n company_name\n \n, \n \n \n contact_id\n \n as \n \n contact_id\n \n, \n \n \n country\n \n as \n \n country\n \n, \n \n \n country_code\n \n as \n \n country_code\n \n, \n \n \n department\n \n as \n \n department\n \n, \n \n \n email\n \n as \n \n email\n \n, \n \n \n first_name\n \n as \n \n first_name\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n individual_id\n \n as \n \n individual_id\n \n, \n \n \n is_active\n \n as \n \n is_active\n \n, \n \n \n last_login_date\n \n as \n \n last_login_date\n \n, \n \n \n last_name\n \n as \n \n last_name\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n manager_id\n \n as \n \n manager_id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n postal_code\n \n as \n \n postal_code\n \n, \n \n \n profile_id\n \n as \n \n profile_id\n \n, \n \n \n state\n \n as \n \n state\n \n, \n \n \n state_code\n \n as \n \n state_code\n \n, \n \n \n street\n \n as \n \n street\n \n, \n \n \n title\n \n as \n \n title\n \n, \n \n \n user_role_id\n \n as \n \n user_role_id\n \n, \n \n \n user_type\n \n as \n \n user_type\n \n, \n \n \n username\n \n as \n \n username\n \n, \n cast(null as TEXT) as \n \n AccountId\n \n , \n cast(null as TEXT) as \n \n CompanyName\n \n , \n cast(null as TEXT) as \n \n ContactId\n \n , \n cast(null as TEXT) as \n \n CountryCode\n \n , \n cast(null as TEXT) as \n \n FirstName\n \n , \n cast(null as TEXT) as \n \n IndividualId\n \n , \n cast(null as boolean) as \n \n IsActive\n \n , \n cast(null as timestamp) as \n \n LastLoginDate\n \n , \n cast(null as TEXT) as \n \n LastName\n \n , \n cast(null as timestamp) as \n \n LastReferencedDate\n \n , \n cast(null as timestamp) as \n \n LastViewedDate\n \n , \n cast(null as TEXT) as \n \n ManagerId\n \n , \n cast(null as TEXT) as \n \n PostalCode\n \n , \n cast(null as TEXT) as \n \n ProfileId\n \n , \n cast(null as TEXT) as \n \n StateCode\n \n , \n cast(null as TEXT) as \n \n UserRoleId\n \n , \n cast(null as TEXT) as \n \n UserType\n \n \n\n\n\n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_user_data\"\n), \n\nfinal as (\n \n select \n _fivetran_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n coalesce(cast(AccountId as TEXT),\n cast(account_id as TEXT))\n as account_id,\n \n\n\n cast(Alias as TEXT) as alias,\n \n\n\n cast(City as TEXT) as city,\n \n\n\n coalesce(cast(CompanyName as TEXT),\n cast(company_name as TEXT))\n as company_name,\n \n\n\n coalesce(cast(ContactId as TEXT),\n cast(contact_id as TEXT))\n as contact_id,\n \n\n\n cast(Country as TEXT) as country,\n \n\n\n coalesce(cast(CountryCode as TEXT),\n cast(country_code as TEXT))\n as country_code,\n \n\n\n cast(Department as TEXT) as department,\n \n\n\n cast(Email as TEXT) as email,\n \n\n\n coalesce(cast(FirstName as TEXT),\n cast(first_name as TEXT))\n as first_name,\n \n\n\n cast(Id as TEXT) as user_id,\n \n\n\n coalesce(cast(IndividualId as TEXT),\n cast(individual_id as TEXT))\n as individual_id,\n \n\n\n coalesce(cast(IsActive as boolean),\n cast(is_active as boolean))\n as is_active,\n \n\n\n coalesce(cast(LastLoginDate as timestamp),\n cast(last_login_date as timestamp))\n as last_login_date,\n \n\n\n coalesce(cast(LastName as TEXT),\n cast(last_name as TEXT))\n as last_name,\n \n\n\n coalesce(cast(LastReferencedDate as timestamp),\n cast(last_referenced_date as timestamp))\n as last_referenced_date,\n \n\n\n coalesce(cast(LastViewedDate as timestamp),\n cast(last_viewed_date as timestamp))\n as last_viewed_date,\n \n\n\n coalesce(cast(ManagerId as TEXT),\n cast(manager_id as TEXT))\n as manager_id,\n \n\n\n cast(Name as TEXT) as user_name,\n \n\n\n coalesce(cast(PostalCode as TEXT),\n cast(postal_code as TEXT))\n as postal_code,\n \n\n\n coalesce(cast(ProfileId as TEXT),\n cast(profile_id as TEXT))\n as profile_id,\n \n\n\n cast(State as TEXT) as state,\n \n\n\n coalesce(cast(StateCode as TEXT),\n cast(state_code as TEXT))\n as state_code,\n \n\n\n cast(Street as TEXT) as street,\n \n\n\n cast(Title as TEXT) as title,\n \n\n\n coalesce(cast(UserRoleId as TEXT),\n cast(user_role_id as TEXT))\n as user_role_id,\n \n\n\n coalesce(cast(UserType as TEXT),\n cast(user_type as TEXT))\n as user_type,\n \n\n\n cast(Username as TEXT) as username\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect * \nfrom final", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "model.salesforce_source.stg_salesforce__task": {"database": "postgres", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__task", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce/stg_salesforce__task.sql", "original_file_path": "models/salesforce/stg_salesforce__task.sql", "unique_id": "model.salesforce_source.stg_salesforce__task", "fqn": ["salesforce_source", "salesforce", "stg_salesforce__task"], "alias": "stg_salesforce__task", "checksum": {"name": "sha256", "checksum": "2a4ca02e3d0a49f3789844be9bb180ee2876fd844ee887102b4df684acd9b63c"}, "config": {"enabled": true, "alias": null, "schema": "salesforce_source_dev", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "table", "incremental_strategy": 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": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected"}, "tags": [], "description": "Represents a business activity such as making a phone call or other to-do items. In the user interface, Task and Event records are collectively referred to as activities.", "columns": {"task_id": {"name": "task_id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "Represents the ID of the related Account. The AccountId is determined as follows. If the value of WhatId is any of the following objects, then Salesforce uses that object\u2019s AccountId. Account Opportunity Contract Custom object that is a child of Account If the value of the WhatIdfield is any other object, and the value of the WhoId field is a Contact object, then Salesforce uses that contact\u2019s AccountId. (If your organization uses Shared Activities, then Salesforce uses the AccountId of the primary contact.) Otherwise, Salesforce sets the value of the AccountId field to null. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "activity_date": {"name": "activity_date", "description": "Represents the due date of the task. This field has a timestamp that is always set to midnight in the Coordinated Universal Time (UTC) time zone. The timestamp is not relevant; do not attempt to alter it to accommodate time zone differences. Label is Due Date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "call_disposition": {"name": "call_disposition", "description": "Represents the result of a given call, for example, \u201cwe'll call back,\u201d or \u201ccall unsuccessful.\u201d Limit is 255 characters. Not subject to field-level security, available for any user in an organization with Salesforce CRM Call Center.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "call_duration_in_seconds": {"name": "call_duration_in_seconds", "description": "Duration of the call in seconds. Not subject to field-level security, available for any user in an organization with Salesforce CRM Call Center.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "call_object": {"name": "call_object", "description": "Name of a call center. Limit is 255 characters. Not subject to field-level security, available for any user in an organization with Salesforce CRM Call Center.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "call_type": {"name": "call_type", "description": "The type of call being answered: Inbound, Internal, or Outbound.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "completed_date_time": {"name": "completed_date_time", "description": "The date and time the task was saved with a Closed status. For insert, if the task is saved with a Closed status the field is set. If the task is saved with an Open status the field is set to NULL. For update, if the task is saved with a new Closed status, the field is reset. If the task is saved with a new non-closed status, the field is reset to NULL. If the task is saved with the same closed status (that is, unchanged) there is no change to the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "task_description": {"name": "task_description", "description": "Contains a text description of the task.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_archived": {"name": "is_archived", "description": "Indicates whether the event has been archived.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_closed": {"name": "is_closed", "description": "Indicates whether the task has been completed (true) or not (false). Is only set indirectly via the Status picklist. Label is Closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_high_priority": {"name": "is_high_priority", "description": "Indicates a high-priority task. This field is derived from the Priority field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "ID of the User or Group who owns the record. Label is Assigned To ID. This field accepts Groups of type Queue only. In the user interface, Group IDs correspond with the queue\u2019s list view names. To create or update tasks assigned to Group, use v48.0 or later. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "priority": {"name": "priority", "description": "Required. Indicates the importance or urgency of a task, such as high or low.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"name": "status", "description": "Required. The status of the task, such as In Progress or Completed. Each predefined Status field implies a value for the IsClosed flag. To obtain picklist values, query the TaskStatus object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "subject": {"name": "subject", "description": "The subject line of the task, such as \u201cCall\u201d or \u201cSend Quote.\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "system_modstamp": {"name": "system_modstamp", "description": "System Modstamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "task_subtype": {"name": "task_subtype", "description": "Provides standard subtypes to facilitate creating and searching for specific task subtypes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "The type of task, such as Call or Meeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "what_count": {"name": "what_count", "description": "Available to organizations that have Shared Activities enabled. Count of related TaskRelations pertaining to WhatId. Count of the WhatId must be 1 or less.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "what_id": {"name": "what_id", "description": "The WhatId represents nonhuman objects such as accounts, opportunities, campaigns, cases, or custom objects. WhatIds are polymorphic. Polymorphic means a WhatId is equivalent to the ID of a related object. The label is Related To ID. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "who_count": {"name": "who_count", "description": "Available to organizations that have Shared Activities enabled. Count of related TaskRelations pertaining to WhoId.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "who_id": {"name": "who_id", "description": "The WhoId represents a human such as a lead or a contact. WhoIds are polymorphic. Polymorphic means a WhoId is equivalent to a contact\u2019s ID or a lead\u2019s ID. The label is Name ID. If Shared Activities is enabled, the value of this field is the ID of the related lead or primary contact. If you add, update, or remove the WhoId field, you might encounter problems with triggers, workflows, and data validation rules that are associated with the record. The label is Name ID. Beginning in API version 37.0, if the contact or lead ID in the WhoId field is not in the TaskWhoIds list, no error occurs and the ID is added to the TaskWhoIds as the primary WhoId. If WhoId is set to null, an arbitrary ID from the existing TaskWhoIds list is promoted to the primary position.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce/stg_salesforce.yml", "build_path": null, "unrendered_config": {"materialized": "table", "enabled": true, "schema": "salesforce_source_{{ var('directed_schema','dev') }}"}, "created_at": 1720574246.377461, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__task\"", "raw_code": "--To disable this model, set the salesforce__task_enabled variable within your dbt_project.yml file to False.\n{{ config(enabled=var('salesforce__task_enabled', True)) }}\n\n{% set task_column_list = get_task_columns() -%}\n{% set task_dict = column_list_to_dict(task_column_list) -%}\n\nwith fields as (\n\n select\n {{\n fivetran_utils.fill_staging_columns(\n source_columns=adapter.get_columns_in_relation(source('salesforce','task')),\n staging_columns=task_column_list\n )\n }}\n \n from {{ source('salesforce','task') }}\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced,\n {{ salesforce_source.coalesce_rename(\"id\", task_dict, alias=\"task_id\") }},\n {{ salesforce_source.coalesce_rename(\"account_id\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"activity_date\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"call_disposition\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"call_duration_in_seconds\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"call_object\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"call_type\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"completed_date_time\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"created_by_id\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"created_date\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"description\", task_dict, alias=\"task_description\") }},\n {{ salesforce_source.coalesce_rename(\"is_archived\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"is_closed\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"is_deleted\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"is_high_priority\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_modified_by_id\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"last_modified_date\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"owner_id\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"priority\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"record_type_id\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"status\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"subject\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"task_subtype\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"type\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"what_count\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"what_id\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"who_count\", task_dict) }},\n {{ salesforce_source.coalesce_rename(\"who_id\", task_dict) }}\n \n {{ fivetran_utils.fill_pass_through_columns('salesforce__task_pass_through_columns') }}\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "language": "sql", "refs": [], "sources": [["salesforce", "task"], ["salesforce", "task"]], "metrics": [], "depends_on": {"macros": ["macro.salesforce_source.get_task_columns", "macro.salesforce_source.column_list_to_dict", "macro.fivetran_utils.fill_staging_columns", "macro.dbt.type_timestamp", "macro.salesforce_source.coalesce_rename", "macro.fivetran_utils.fill_pass_through_columns"], "nodes": ["source.salesforce_source.salesforce.task"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce__task.sql", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__task_enabled variable within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n account_id\n \n as \n \n account_id\n \n, \n \n \n activity_date\n \n as \n \n activity_date\n \n, \n \n \n call_disposition\n \n as \n \n call_disposition\n \n, \n \n \n call_duration_in_seconds\n \n as \n \n call_duration_in_seconds\n \n, \n \n \n call_object\n \n as \n \n call_object\n \n, \n \n \n call_type\n \n as \n \n call_type\n \n, \n \n \n completed_date_time\n \n as \n \n completed_date_time\n \n, \n \n \n created_by_id\n \n as \n \n created_by_id\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_archived\n \n as \n \n is_archived\n \n, \n \n \n is_closed\n \n as \n \n is_closed\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n is_high_priority\n \n as \n \n is_high_priority\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n priority\n \n as \n \n priority\n \n, \n \n \n record_type_id\n \n as \n \n record_type_id\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n subject\n \n as \n \n subject\n \n, \n \n \n task_subtype\n \n as \n \n task_subtype\n \n, \n \n \n type\n \n as \n \n type\n \n, \n \n \n what_count\n \n as \n \n what_count\n \n, \n \n \n what_id\n \n as \n \n what_id\n \n, \n \n \n who_count\n \n as \n \n who_count\n \n, \n \n \n who_id\n \n as \n \n who_id\n \n, \n cast(null as TEXT) as \n \n AccountId\n \n , \n cast(null as timestamp) as \n \n ActivityDate\n \n , \n cast(null as TEXT) as \n \n CallDisposition\n \n , \n cast(null as integer) as \n \n CallDurationInSeconds\n \n , \n cast(null as TEXT) as \n \n CallObject\n \n , \n cast(null as TEXT) as \n \n CallType\n \n , \n cast(null as timestamp) as \n \n CompletedDateTime\n \n , \n cast(null as TEXT) as \n \n CreatedById\n \n , \n cast(null as timestamp) as \n \n CreatedDate\n \n , \n cast(null as boolean) as \n \n IsArchived\n \n , \n cast(null as boolean) as \n \n IsClosed\n \n , \n cast(null as boolean) as \n \n IsDeleted\n \n , \n cast(null as boolean) as \n \n IsHighPriority\n \n , \n cast(null as TEXT) as \n \n LastModifiedById\n \n , \n cast(null as timestamp) as \n \n LastModifiedDate\n \n , \n cast(null as TEXT) as \n \n OwnerId\n \n , \n cast(null as TEXT) as \n \n RecordTypeId\n \n , \n cast(null as TEXT) as \n \n TaskSubtype\n \n , \n cast(null as integer) as \n \n WhatCount\n \n , \n cast(null as TEXT) as \n \n WhatId\n \n , \n cast(null as integer) as \n \n WhoCount\n \n , \n cast(null as TEXT) as \n \n WhoId\n \n \n\n\n \n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_task_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n cast(Id as TEXT) as task_id,\n \n\n\n coalesce(cast(AccountId as TEXT),\n cast(account_id as TEXT))\n as account_id,\n \n\n\n coalesce(cast(ActivityDate as timestamp),\n cast(activity_date as timestamp))\n as activity_date,\n \n\n\n coalesce(cast(CallDisposition as TEXT),\n cast(call_disposition as TEXT))\n as call_disposition,\n \n\n\n coalesce(cast(CallDurationInSeconds as integer),\n cast(call_duration_in_seconds as integer))\n as call_duration_in_seconds,\n \n\n\n coalesce(cast(CallObject as TEXT),\n cast(call_object as TEXT))\n as call_object,\n \n\n\n coalesce(cast(CallType as TEXT),\n cast(call_type as TEXT))\n as call_type,\n \n\n\n coalesce(cast(CompletedDateTime as timestamp),\n cast(completed_date_time as timestamp))\n as completed_date_time,\n \n\n\n coalesce(cast(CreatedById as TEXT),\n cast(created_by_id as TEXT))\n as created_by_id,\n \n\n\n coalesce(cast(CreatedDate as timestamp),\n cast(created_date as timestamp))\n as created_date,\n \n\n\n cast(Description as TEXT) as task_description,\n \n\n\n coalesce(cast(IsArchived as boolean),\n cast(is_archived as boolean))\n as is_archived,\n \n\n\n coalesce(cast(IsClosed as boolean),\n cast(is_closed as boolean))\n as is_closed,\n \n\n\n coalesce(cast(IsDeleted as boolean),\n cast(is_deleted as boolean))\n as is_deleted,\n \n\n\n coalesce(cast(IsHighPriority as boolean),\n cast(is_high_priority as boolean))\n as is_high_priority,\n \n\n\n coalesce(cast(LastModifiedById as TEXT),\n cast(last_modified_by_id as TEXT))\n as last_modified_by_id,\n \n\n\n coalesce(cast(LastModifiedDate as timestamp),\n cast(last_modified_date as timestamp))\n as last_modified_date,\n \n\n\n coalesce(cast(OwnerId as TEXT),\n cast(owner_id as TEXT))\n as owner_id,\n \n\n\n cast(Priority as TEXT) as priority,\n \n\n\n coalesce(cast(RecordTypeId as TEXT),\n cast(record_type_id as TEXT))\n as record_type_id,\n \n\n\n cast(Status as TEXT) as status,\n \n\n\n cast(Subject as TEXT) as subject,\n \n\n\n coalesce(cast(TaskSubtype as TEXT),\n cast(task_subtype as TEXT))\n as task_subtype,\n \n\n\n cast(Type as TEXT) as type,\n \n\n\n coalesce(cast(WhatCount as integer),\n cast(what_count as integer))\n as what_count,\n \n\n\n coalesce(cast(WhatId as TEXT),\n cast(what_id as TEXT))\n as what_id,\n \n\n\n coalesce(cast(WhoCount as integer),\n cast(who_count as integer))\n as who_count,\n \n\n\n coalesce(cast(WhoId as TEXT),\n cast(who_id as TEXT))\n as who_id\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "test.salesforce_source.not_null_stg_salesforce__account_history_history_unique_key.e946c6dd0e": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "not_null_stg_salesforce__account_history_history_unique_key", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__account_history_history_unique_key.sql", "original_file_path": "models/salesforce_history/stg_salesforce_history.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__account_history_history_unique_key.e946c6dd0e", "fqn": ["salesforce_source", "salesforce_history", "not_null_stg_salesforce__account_history_history_unique_key"], "alias": "not_null_stg_salesforce__account_history_history_unique_key", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.262712, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "history_unique_key", "file_key_name": "models.stg_salesforce__account_history", "attached_node": "model.salesforce_source.stg_salesforce__account_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "history_unique_key", "model": "{{ get_where_subquery(ref('stg_salesforce__account_history')) }}"}, "namespace": null}}, "test.salesforce_source.unique_stg_salesforce__account_history_history_unique_key.c378da769f": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "unique_stg_salesforce__account_history_history_unique_key", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__account_history_history_unique_key.sql", "original_file_path": "models/salesforce_history/stg_salesforce_history.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__account_history_history_unique_key.c378da769f", "fqn": ["salesforce_source", "salesforce_history", "unique_stg_salesforce__account_history_history_unique_key"], "alias": "unique_stg_salesforce__account_history_history_unique_key", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.263961, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "history_unique_key", "file_key_name": "models.stg_salesforce__account_history", "attached_node": "model.salesforce_source.stg_salesforce__account_history", "test_metadata": {"name": "unique", "kwargs": {"column_name": "history_unique_key", "model": "{{ get_where_subquery(ref('stg_salesforce__account_history')) }}"}, "namespace": null}}, "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__account_history_account_id___fivetran_start___fivetran_end.7db755dfc6": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "dbt_utils_unique_combination_of_columns_stg_salesforce__account_history_account_id___fivetran_start___fivetran_end", "resource_type": "test", "package_name": "salesforce_source", "path": "dbt_utils_unique_combination_o_1ba018981642a994c5b439e57bcdab6b.sql", "original_file_path": "models/salesforce_history/stg_salesforce_history.yml", "unique_id": "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__account_history_account_id___fivetran_start___fivetran_end.7db755dfc6", "fqn": ["salesforce_source", "salesforce_history", "dbt_utils_unique_combination_of_columns_stg_salesforce__account_history_account_id___fivetran_start___fivetran_end"], "alias": "dbt_utils_unique_combination_o_1ba018981642a994c5b439e57bcdab6b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": false, "alias": "dbt_utils_unique_combination_o_1ba018981642a994c5b439e57bcdab6b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 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": "dbt_utils_unique_combination_o_1ba018981642a994c5b439e57bcdab6b"}, "created_at": 1720574246.2649999, "relation_name": null, "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_1ba018981642a994c5b439e57bcdab6b\") }}", "language": "sql", "refs": [{"name": "stg_salesforce__account_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": null, "file_key_name": "models.stg_salesforce__account_history", "attached_node": "model.salesforce_source.stg_salesforce__account_history", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["account_id", "_fivetran_start", "_fivetran_end"], "model": "{{ get_where_subquery(ref('stg_salesforce__account_history')) }}"}, "namespace": "dbt_utils"}}, "test.salesforce_source.not_null_stg_salesforce__contact_history_history_unique_key.673cb181cf": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "not_null_stg_salesforce__contact_history_history_unique_key", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__contact_history_history_unique_key.sql", "original_file_path": "models/salesforce_history/stg_salesforce_history.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__contact_history_history_unique_key.673cb181cf", "fqn": ["salesforce_source", "salesforce_history", "not_null_stg_salesforce__contact_history_history_unique_key"], "alias": "not_null_stg_salesforce__contact_history_history_unique_key", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.278185, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "history_unique_key", "file_key_name": "models.stg_salesforce__contact_history", "attached_node": "model.salesforce_source.stg_salesforce__contact_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "history_unique_key", "model": "{{ get_where_subquery(ref('stg_salesforce__contact_history')) }}"}, "namespace": null}}, "test.salesforce_source.unique_stg_salesforce__contact_history_history_unique_key.215181e10d": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "unique_stg_salesforce__contact_history_history_unique_key", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__contact_history_history_unique_key.sql", "original_file_path": "models/salesforce_history/stg_salesforce_history.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__contact_history_history_unique_key.215181e10d", "fqn": ["salesforce_source", "salesforce_history", "unique_stg_salesforce__contact_history_history_unique_key"], "alias": "unique_stg_salesforce__contact_history_history_unique_key", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.2794318, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "history_unique_key", "file_key_name": "models.stg_salesforce__contact_history", "attached_node": "model.salesforce_source.stg_salesforce__contact_history", "test_metadata": {"name": "unique", "kwargs": {"column_name": "history_unique_key", "model": "{{ get_where_subquery(ref('stg_salesforce__contact_history')) }}"}, "namespace": null}}, "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__contact_history_contact_id___fivetran_start___fivetran_end.2d7ff092ee": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "dbt_utils_unique_combination_of_columns_stg_salesforce__contact_history_contact_id___fivetran_start___fivetran_end", "resource_type": "test", "package_name": "salesforce_source", "path": "dbt_utils_unique_combination_o_8338e0f8a1f58c9bf73432eac5cc75b2.sql", "original_file_path": "models/salesforce_history/stg_salesforce_history.yml", "unique_id": "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__contact_history_contact_id___fivetran_start___fivetran_end.2d7ff092ee", "fqn": ["salesforce_source", "salesforce_history", "dbt_utils_unique_combination_of_columns_stg_salesforce__contact_history_contact_id___fivetran_start___fivetran_end"], "alias": "dbt_utils_unique_combination_o_8338e0f8a1f58c9bf73432eac5cc75b2", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": false, "alias": "dbt_utils_unique_combination_o_8338e0f8a1f58c9bf73432eac5cc75b2", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 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": "dbt_utils_unique_combination_o_8338e0f8a1f58c9bf73432eac5cc75b2"}, "created_at": 1720574246.2806132, "relation_name": null, "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_8338e0f8a1f58c9bf73432eac5cc75b2\") }}", "language": "sql", "refs": [{"name": "stg_salesforce__contact_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": null, "file_key_name": "models.stg_salesforce__contact_history", "attached_node": "model.salesforce_source.stg_salesforce__contact_history", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["contact_id", "_fivetran_start", "_fivetran_end"], "model": "{{ get_where_subquery(ref('stg_salesforce__contact_history')) }}"}, "namespace": "dbt_utils"}}, "test.salesforce_source.not_null_stg_salesforce__opportunity_history_history_unique_key.32fa6270e0": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "not_null_stg_salesforce__opportunity_history_history_unique_key", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__opportunity_history_history_unique_key.sql", "original_file_path": "models/salesforce_history/stg_salesforce_history.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__opportunity_history_history_unique_key.32fa6270e0", "fqn": ["salesforce_source", "salesforce_history", "not_null_stg_salesforce__opportunity_history_history_unique_key"], "alias": "not_null_stg_salesforce__opportunity_history_history_unique_key", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.2835572, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__opportunity_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "history_unique_key", "file_key_name": "models.stg_salesforce__opportunity_history", "attached_node": "model.salesforce_source.stg_salesforce__opportunity_history", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "history_unique_key", "model": "{{ get_where_subquery(ref('stg_salesforce__opportunity_history')) }}"}, "namespace": null}}, "test.salesforce_source.unique_stg_salesforce__opportunity_history_history_unique_key.b5b08bda67": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "unique_stg_salesforce__opportunity_history_history_unique_key", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__opportunity_history_history_unique_key.sql", "original_file_path": "models/salesforce_history/stg_salesforce_history.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__opportunity_history_history_unique_key.b5b08bda67", "fqn": ["salesforce_source", "salesforce_history", "unique_stg_salesforce__opportunity_history_history_unique_key"], "alias": "unique_stg_salesforce__opportunity_history_history_unique_key", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.2849312, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__opportunity_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "history_unique_key", "file_key_name": "models.stg_salesforce__opportunity_history", "attached_node": "model.salesforce_source.stg_salesforce__opportunity_history", "test_metadata": {"name": "unique", "kwargs": {"column_name": "history_unique_key", "model": "{{ get_where_subquery(ref('stg_salesforce__opportunity_history')) }}"}, "namespace": null}}, "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__opportunity_history_opportunity_id___fivetran_start___fivetran_end.1209811435": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "dbt_utils_unique_combination_of_columns_stg_salesforce__opportunity_history_opportunity_id___fivetran_start___fivetran_end", "resource_type": "test", "package_name": "salesforce_source", "path": "dbt_utils_unique_combination_o_6a5f6a74dbae2db6a4bb18ed90b8a8e9.sql", "original_file_path": "models/salesforce_history/stg_salesforce_history.yml", "unique_id": "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__opportunity_history_opportunity_id___fivetran_start___fivetran_end.1209811435", "fqn": ["salesforce_source", "salesforce_history", "dbt_utils_unique_combination_of_columns_stg_salesforce__opportunity_history_opportunity_id___fivetran_start___fivetran_end"], "alias": "dbt_utils_unique_combination_o_6a5f6a74dbae2db6a4bb18ed90b8a8e9", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": false, "alias": "dbt_utils_unique_combination_o_6a5f6a74dbae2db6a4bb18ed90b8a8e9", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 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": "dbt_utils_unique_combination_o_6a5f6a74dbae2db6a4bb18ed90b8a8e9"}, "created_at": 1720574246.286131, "relation_name": null, "raw_code": "{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias=\"dbt_utils_unique_combination_o_6a5f6a74dbae2db6a4bb18ed90b8a8e9\") }}", "language": "sql", "refs": [{"name": "stg_salesforce__opportunity_history", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt_utils.test_unique_combination_of_columns", "macro.dbt.get_where_subquery"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": null, "file_key_name": "models.stg_salesforce__opportunity_history", "attached_node": "model.salesforce_source.stg_salesforce__opportunity_history", "test_metadata": {"name": "unique_combination_of_columns", "kwargs": {"combination_of_columns": ["opportunity_id", "_fivetran_start", "_fivetran_end"], "model": "{{ get_where_subquery(ref('stg_salesforce__opportunity_history')) }}"}, "namespace": "dbt_utils"}}, "test.salesforce_source.not_null_stg_salesforce__account_account_id.1e0ff361d4": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "not_null_stg_salesforce__account_account_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__account_account_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__account_account_id.1e0ff361d4", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__account_account_id"], "alias": "not_null_stg_salesforce__account_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.3780632, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__account", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__account"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__account_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__account\"\nwhere account_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_salesforce__account", "attached_node": "model.salesforce_source.stg_salesforce__account", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_salesforce__account')) }}"}, "namespace": null}}, "test.salesforce_source.unique_stg_salesforce__account_account_id.6d58a39ba7": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "unique_stg_salesforce__account_account_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__account_account_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__account_account_id.6d58a39ba7", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__account_account_id"], "alias": "unique_stg_salesforce__account_account_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.379141, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__account", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__account"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__account_account_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n account_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__account\"\nwhere account_id is not null\ngroup by account_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "account_id", "file_key_name": "models.stg_salesforce__account", "attached_node": "model.salesforce_source.stg_salesforce__account", "test_metadata": {"name": "unique", "kwargs": {"column_name": "account_id", "model": "{{ get_where_subquery(ref('stg_salesforce__account')) }}"}, "namespace": null}}, "test.salesforce_source.not_null_stg_salesforce__opportunity_opportunity_id.234c5e60bd": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "not_null_stg_salesforce__opportunity_opportunity_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__opportunity_opportunity_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__opportunity_opportunity_id.234c5e60bd", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__opportunity_opportunity_id"], "alias": "not_null_stg_salesforce__opportunity_opportunity_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.380123, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__opportunity", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__opportunity"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__opportunity_opportunity_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect opportunity_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__opportunity\"\nwhere opportunity_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "opportunity_id", "file_key_name": "models.stg_salesforce__opportunity", "attached_node": "model.salesforce_source.stg_salesforce__opportunity", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "opportunity_id", "model": "{{ get_where_subquery(ref('stg_salesforce__opportunity')) }}"}, "namespace": null}}, "test.salesforce_source.unique_stg_salesforce__opportunity_opportunity_id.367b0f577a": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "unique_stg_salesforce__opportunity_opportunity_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__opportunity_opportunity_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__opportunity_opportunity_id.367b0f577a", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__opportunity_opportunity_id"], "alias": "unique_stg_salesforce__opportunity_opportunity_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.3810902, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__opportunity", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__opportunity"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__opportunity_opportunity_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n opportunity_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__opportunity\"\nwhere opportunity_id is not null\ngroup by opportunity_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "opportunity_id", "file_key_name": "models.stg_salesforce__opportunity", "attached_node": "model.salesforce_source.stg_salesforce__opportunity", "test_metadata": {"name": "unique", "kwargs": {"column_name": "opportunity_id", "model": "{{ get_where_subquery(ref('stg_salesforce__opportunity')) }}"}, "namespace": null}}, "test.salesforce_source.not_null_stg_salesforce__user_user_id.ac0ab26d65": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "not_null_stg_salesforce__user_user_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__user_user_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__user_user_id.ac0ab26d65", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__user_user_id"], "alias": "not_null_stg_salesforce__user_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.382106, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__user", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__user"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__user_user_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect user_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__user\"\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_salesforce__user", "attached_node": "model.salesforce_source.stg_salesforce__user", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('stg_salesforce__user')) }}"}, "namespace": null}}, "test.salesforce_source.unique_stg_salesforce__user_user_id.9a29b41152": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "unique_stg_salesforce__user_user_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__user_user_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__user_user_id.9a29b41152", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__user_user_id"], "alias": "unique_stg_salesforce__user_user_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.3830788, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__user", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__user"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__user_user_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n user_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__user\"\nwhere user_id is not null\ngroup by user_id\nhaving count(*) > 1\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_salesforce__user", "attached_node": "model.salesforce_source.stg_salesforce__user", "test_metadata": {"name": "unique", "kwargs": {"column_name": "user_id", "model": "{{ get_where_subquery(ref('stg_salesforce__user')) }}"}, "namespace": null}}, "test.salesforce_source.not_null_stg_salesforce__user_role_user_role_id.949036e9bd": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "not_null_stg_salesforce__user_role_user_role_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__user_role_user_role_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__user_role_user_role_id.949036e9bd", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__user_role_user_role_id"], "alias": "not_null_stg_salesforce__user_role_user_role_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.384085, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__user_role", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__user_role"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__user_role_user_role_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect user_role_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__user_role\"\nwhere user_role_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_role_id", "file_key_name": "models.stg_salesforce__user_role", "attached_node": "model.salesforce_source.stg_salesforce__user_role", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "user_role_id", "model": "{{ get_where_subquery(ref('stg_salesforce__user_role')) }}"}, "namespace": null}}, "test.salesforce_source.unique_stg_salesforce__user_role_user_role_id.1259050718": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "unique_stg_salesforce__user_role_user_role_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__user_role_user_role_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__user_role_user_role_id.1259050718", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__user_role_user_role_id"], "alias": "unique_stg_salesforce__user_role_user_role_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.3850749, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__user_role", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__user_role"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__user_role_user_role_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n user_role_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__user_role\"\nwhere user_role_id is not null\ngroup by user_role_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "user_role_id", "file_key_name": "models.stg_salesforce__user_role", "attached_node": "model.salesforce_source.stg_salesforce__user_role", "test_metadata": {"name": "unique", "kwargs": {"column_name": "user_role_id", "model": "{{ get_where_subquery(ref('stg_salesforce__user_role')) }}"}, "namespace": null}}, "test.salesforce_source.not_null_stg_salesforce__contact_contact_id.d7c02bef78": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "not_null_stg_salesforce__contact_contact_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__contact_contact_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__contact_contact_id.d7c02bef78", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__contact_contact_id"], "alias": "not_null_stg_salesforce__contact_contact_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.386038, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__contact", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__contact"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__contact_contact_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect contact_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__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_salesforce__contact", "attached_node": "model.salesforce_source.stg_salesforce__contact", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "contact_id", "model": "{{ get_where_subquery(ref('stg_salesforce__contact')) }}"}, "namespace": null}}, "test.salesforce_source.unique_stg_salesforce__contact_contact_id.0cc2c0609e": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "unique_stg_salesforce__contact_contact_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__contact_contact_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__contact_contact_id.0cc2c0609e", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__contact_contact_id"], "alias": "unique_stg_salesforce__contact_contact_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.3870451, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__contact", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__contact"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__contact_contact_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n contact_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__contact\"\nwhere contact_id is not null\ngroup by contact_id\nhaving count(*) > 1\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_salesforce__contact", "attached_node": "model.salesforce_source.stg_salesforce__contact", "test_metadata": {"name": "unique", "kwargs": {"column_name": "contact_id", "model": "{{ get_where_subquery(ref('stg_salesforce__contact')) }}"}, "namespace": null}}, "test.salesforce_source.not_null_stg_salesforce__event_event_id.e964b30db8": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "not_null_stg_salesforce__event_event_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__event_event_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__event_event_id.e964b30db8", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__event_event_id"], "alias": "not_null_stg_salesforce__event_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.388006, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__event", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__event"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__event_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__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_salesforce__event", "attached_node": "model.salesforce_source.stg_salesforce__event", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_salesforce__event')) }}"}, "namespace": null}}, "test.salesforce_source.unique_stg_salesforce__event_event_id.13f7c8c0d9": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "unique_stg_salesforce__event_event_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__event_event_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__event_event_id.13f7c8c0d9", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__event_event_id"], "alias": "unique_stg_salesforce__event_event_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.3889668, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__event", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__event"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__event_event_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n event_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__event\"\nwhere event_id is not null\ngroup by event_id\nhaving count(*) > 1\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_salesforce__event", "attached_node": "model.salesforce_source.stg_salesforce__event", "test_metadata": {"name": "unique", "kwargs": {"column_name": "event_id", "model": "{{ get_where_subquery(ref('stg_salesforce__event')) }}"}, "namespace": null}}, "test.salesforce_source.not_null_stg_salesforce__lead_lead_id.e2ba6b2026": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "not_null_stg_salesforce__lead_lead_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__lead_lead_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__lead_lead_id.e2ba6b2026", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__lead_lead_id"], "alias": "not_null_stg_salesforce__lead_lead_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.389932, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__lead", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__lead"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__lead_lead_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect lead_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__lead\"\nwhere lead_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lead_id", "file_key_name": "models.stg_salesforce__lead", "attached_node": "model.salesforce_source.stg_salesforce__lead", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "lead_id", "model": "{{ get_where_subquery(ref('stg_salesforce__lead')) }}"}, "namespace": null}}, "test.salesforce_source.unique_stg_salesforce__lead_lead_id.ba8b21e282": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "unique_stg_salesforce__lead_lead_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__lead_lead_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__lead_lead_id.ba8b21e282", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__lead_lead_id"], "alias": "unique_stg_salesforce__lead_lead_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.390931, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__lead", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__lead"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__lead_lead_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n lead_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__lead\"\nwhere lead_id is not null\ngroup by lead_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "lead_id", "file_key_name": "models.stg_salesforce__lead", "attached_node": "model.salesforce_source.stg_salesforce__lead", "test_metadata": {"name": "unique", "kwargs": {"column_name": "lead_id", "model": "{{ get_where_subquery(ref('stg_salesforce__lead')) }}"}, "namespace": null}}, "test.salesforce_source.not_null_stg_salesforce__opportunity_line_item_opportunity_line_item_id.b5d2465072": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "not_null_stg_salesforce__opportunity_line_item_opportunity_line_item_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__oppor_cdeb75ef90723b483025a6ea3200473b.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__opportunity_line_item_opportunity_line_item_id.b5d2465072", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__opportunity_line_item_opportunity_line_item_id"], "alias": "not_null_stg_salesforce__oppor_cdeb75ef90723b483025a6ea3200473b", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "not_null_stg_salesforce__oppor_cdeb75ef90723b483025a6ea3200473b", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 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_salesforce__oppor_cdeb75ef90723b483025a6ea3200473b"}, "created_at": 1720574246.3918998, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}{{ config(alias=\"not_null_stg_salesforce__oppor_cdeb75ef90723b483025a6ea3200473b\") }}", "language": "sql", "refs": [{"name": "stg_salesforce__opportunity_line_item", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__opportunity_line_item"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__oppor_cdeb75ef90723b483025a6ea3200473b.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect opportunity_line_item_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__opportunity_line_item\"\nwhere opportunity_line_item_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "opportunity_line_item_id", "file_key_name": "models.stg_salesforce__opportunity_line_item", "attached_node": "model.salesforce_source.stg_salesforce__opportunity_line_item", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "opportunity_line_item_id", "model": "{{ get_where_subquery(ref('stg_salesforce__opportunity_line_item')) }}"}, "namespace": null}}, "test.salesforce_source.unique_stg_salesforce__opportunity_line_item_opportunity_line_item_id.c18042d902": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "unique_stg_salesforce__opportunity_line_item_opportunity_line_item_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__opportu_e7519b9845106f63a1bb91c4defd69e4.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__opportunity_line_item_opportunity_line_item_id.c18042d902", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__opportunity_line_item_opportunity_line_item_id"], "alias": "unique_stg_salesforce__opportu_e7519b9845106f63a1bb91c4defd69e4", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": "unique_stg_salesforce__opportu_e7519b9845106f63a1bb91c4defd69e4", "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 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_stg_salesforce__opportu_e7519b9845106f63a1bb91c4defd69e4"}, "created_at": 1720574246.392877, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}{{ config(alias=\"unique_stg_salesforce__opportu_e7519b9845106f63a1bb91c4defd69e4\") }}", "language": "sql", "refs": [{"name": "stg_salesforce__opportunity_line_item", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__opportunity_line_item"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__opportu_e7519b9845106f63a1bb91c4defd69e4.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n opportunity_line_item_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__opportunity_line_item\"\nwhere opportunity_line_item_id is not null\ngroup by opportunity_line_item_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "opportunity_line_item_id", "file_key_name": "models.stg_salesforce__opportunity_line_item", "attached_node": "model.salesforce_source.stg_salesforce__opportunity_line_item", "test_metadata": {"name": "unique", "kwargs": {"column_name": "opportunity_line_item_id", "model": "{{ get_where_subquery(ref('stg_salesforce__opportunity_line_item')) }}"}, "namespace": null}}, "test.salesforce_source.not_null_stg_salesforce__order_order_id.4782f3b34f": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "not_null_stg_salesforce__order_order_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__order_order_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__order_order_id.4782f3b34f", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__order_order_id"], "alias": "not_null_stg_salesforce__order_order_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.393843, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__order", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__order"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__order_order_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect order_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__order\"\nwhere order_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "order_id", "file_key_name": "models.stg_salesforce__order", "attached_node": "model.salesforce_source.stg_salesforce__order", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "order_id", "model": "{{ get_where_subquery(ref('stg_salesforce__order')) }}"}, "namespace": null}}, "test.salesforce_source.unique_stg_salesforce__order_order_id.12a96b4e3c": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "unique_stg_salesforce__order_order_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__order_order_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__order_order_id.12a96b4e3c", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__order_order_id"], "alias": "unique_stg_salesforce__order_order_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.3948019, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__order", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__order"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__order_order_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n order_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__order\"\nwhere order_id is not null\ngroup by order_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "order_id", "file_key_name": "models.stg_salesforce__order", "attached_node": "model.salesforce_source.stg_salesforce__order", "test_metadata": {"name": "unique", "kwargs": {"column_name": "order_id", "model": "{{ get_where_subquery(ref('stg_salesforce__order')) }}"}, "namespace": null}}, "test.salesforce_source.not_null_stg_salesforce__product_2_product_2_id.84aed29e8a": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "not_null_stg_salesforce__product_2_product_2_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__product_2_product_2_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__product_2_product_2_id.84aed29e8a", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__product_2_product_2_id"], "alias": "not_null_stg_salesforce__product_2_product_2_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.395815, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__product_2", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__product_2"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__product_2_product_2_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect product_2_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__product_2\"\nwhere product_2_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "product_2_id", "file_key_name": "models.stg_salesforce__product_2", "attached_node": "model.salesforce_source.stg_salesforce__product_2", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "product_2_id", "model": "{{ get_where_subquery(ref('stg_salesforce__product_2')) }}"}, "namespace": null}}, "test.salesforce_source.unique_stg_salesforce__product_2_product_2_id.b4bc489d61": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "unique_stg_salesforce__product_2_product_2_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__product_2_product_2_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__product_2_product_2_id.b4bc489d61", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__product_2_product_2_id"], "alias": "unique_stg_salesforce__product_2_product_2_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.396769, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__product_2", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__product_2"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__product_2_product_2_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n product_2_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__product_2\"\nwhere product_2_id is not null\ngroup by product_2_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "product_2_id", "file_key_name": "models.stg_salesforce__product_2", "attached_node": "model.salesforce_source.stg_salesforce__product_2", "test_metadata": {"name": "unique", "kwargs": {"column_name": "product_2_id", "model": "{{ get_where_subquery(ref('stg_salesforce__product_2')) }}"}, "namespace": null}}, "test.salesforce_source.not_null_stg_salesforce__task_task_id.aabe11a5d9": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "not_null_stg_salesforce__task_task_id", "resource_type": "test", "package_name": "salesforce_source", "path": "not_null_stg_salesforce__task_task_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.not_null_stg_salesforce__task_task_id.aabe11a5d9", "fqn": ["salesforce_source", "salesforce", "not_null_stg_salesforce__task_task_id"], "alias": "not_null_stg_salesforce__task_task_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.397737, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__task", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__task"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/not_null_stg_salesforce__task_task_id.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect task_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__task\"\nwhere task_id is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "task_id", "file_key_name": "models.stg_salesforce__task", "attached_node": "model.salesforce_source.stg_salesforce__task", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "task_id", "model": "{{ get_where_subquery(ref('stg_salesforce__task')) }}"}, "namespace": null}}, "test.salesforce_source.unique_stg_salesforce__task_task_id.73684ed605": {"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "unique_stg_salesforce__task_task_id", "resource_type": "test", "package_name": "salesforce_source", "path": "unique_stg_salesforce__task_task_id.sql", "original_file_path": "models/salesforce/stg_salesforce.yml", "unique_id": "test.salesforce_source.unique_stg_salesforce__task_task_id.73684ed605", "fqn": ["salesforce_source", "salesforce", "unique_stg_salesforce__task_task_id"], "alias": "unique_stg_salesforce__task_task_id", "checksum": {"name": "none", "checksum": ""}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": [], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {}, "created_at": 1720574246.398687, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "stg_salesforce__task", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.salesforce_source.stg_salesforce__task"]}, "compiled_path": "target/compiled/salesforce_source/models/salesforce/stg_salesforce.yml/unique_stg_salesforce__task_task_id.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n task_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__task\"\nwhere task_id is not null\ngroup by task_id\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "alias_types": true, "checksum": null}, "column_name": "task_id", "file_key_name": "models.stg_salesforce__task", "attached_node": "model.salesforce_source.stg_salesforce__task", "test_metadata": {"name": "unique", "kwargs": {"column_name": "task_id", "model": "{{ get_where_subquery(ref('stg_salesforce__task')) }}"}, "namespace": null}}}, "sources": {"source.salesforce_source.salesforce.account": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "account", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.account", "fqn": ["salesforce_source", "salesforce", "salesforce", "account"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_account_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 24, "period": "hour"}, "error_after": {"count": 48, "period": "hour"}, "filter": null}, "external": null, "description": "Represents an individual account, which is an organization or person involved with your business (such as customers, competitors, and partners).", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_number": {"name": "account_number", "description": "Account number assigned to this account (not the unique, system-generated ID assigned during creation).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_source": {"name": "account_source", "description": "The source of the account record. For example, Advertisement, Data.com, or Trade Show.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "annual_revenue": {"name": "annual_revenue", "description": "Estimated annual revenue of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_city": {"name": "billing_city", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_country": {"name": "billing_country", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_country_code": {"name": "billing_country_code", "description": "The ISO country code for the account\u2019s billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_geocode_accuracy": {"name": "billing_geocode_accuracy", "description": "Accuracy level of the geocode for the billing address. See Compound Field Considerations and Limitations for details on geolocation compound fields.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_latitude": {"name": "billing_latitude", "description": "Used with BillingLongitude to specify the precise geolocation of a billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_longitude": {"name": "billing_longitude", "description": "Used with BillingLatitude to specify the precise geolocation of a billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_postal_code": {"name": "billing_postal_code", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_state": {"name": "billing_state", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_state_code": {"name": "billing_state_code", "description": "The ISO state code for the account\u2019s billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_street": {"name": "billing_street", "description": "Street address for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Text description of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fax": {"name": "fax", "description": "Fax number for the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "industry": {"name": "industry", "description": "An industry associated with this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "jigsaw_company_id": {"name": "jigsaw_company_id", "description": "References the ID of a company in Data.com. If an account has a value in this field, it means that the account was imported from Data.com.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is one of the following, whichever is the most recent", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "master_record_id": {"name": "master_record_id", "description": "If this object was deleted as the result of a merge, this field contains the ID of the record that was kept. If this object was deleted for any other reason, or has not been deleted, the value is null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Required. Name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "number_of_employees": {"name": "number_of_employees", "description": "Number of employees working at the company represented by this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "The ID of the user who currently owns this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "ownership": {"name": "ownership", "description": "Ownership type for the account, for example Private, Public, or Subsidiary.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "ID of the parent object, if any.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "phone": {"name": "phone", "description": "Phone number for this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "photo_url": {"name": "photo_url", "description": "Path to be combined with the URL of a Salesforce instance (for example, https://yourInstance.salesforce.com/) to generate a URL to request the social network profile image associated with the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "rating": {"name": "rating", "description": "The account\u2019s prospect rating, for example Hot, Warm, or Cold.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_city": {"name": "shipping_city", "description": "Details of the shipping address for this account", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_country": {"name": "shipping_country", "description": "Details of the shipping address for this account. Country", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_country_code": {"name": "shipping_country_code", "description": "The ISO country code for the account\u2019s shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_geocode_accuracy": {"name": "shipping_geocode_accuracy", "description": "Accuracy level of the geocode for the shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_latitude": {"name": "shipping_latitude", "description": "Used with ShippingLongitude to specify the precise geolocation of a shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_longitude": {"name": "shipping_longitude", "description": "Used with ShippingLatitude to specify the precise geolocation of an address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_postal_code": {"name": "shipping_postal_code", "description": "Details of the shipping address for this account. Postal code", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_state": {"name": "shipping_state", "description": "Details of the shipping address for this account. State", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_state_code": {"name": "shipping_state_code", "description": "The ISO state code for the account\u2019s shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_street": {"name": "shipping_street", "description": "The street address of the shipping address for this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sic": {"name": "sic", "description": "Standard Industrial Classification code of the company\u2019s main business categorization, for example, 57340 for Electronics.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sic_desc": {"name": "sic_desc", "description": "A brief description of an organization\u2019s line of business, based on its SIC code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "site": {"name": "site", "description": "Name of the account\u2019s location, for example Headquarters or London.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "ticker_symbol": {"name": "ticker_symbol", "description": "The stock market symbol for this account. This field is available on business accounts, not person accounts.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of account, for example, Customer, Competitor, or Partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "website": {"name": "website", "description": "The website of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_account_data\"", "created_at": 1720574246.428395}, "source.salesforce_source.salesforce.opportunity": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "opportunity", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.opportunity", "fqn": ["salesforce_source", "salesforce", "salesforce", "opportunity"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_opportunity_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 24, "period": "hour"}, "error_after": {"count": 48, "period": "hour"}, "filter": null}, "external": null, "description": "Represents an opportunity, which is a sale or pending deal.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "ID of the account associated with this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "amount": {"name": "amount", "description": "Estimated total sale amount. For opportunities with products, the amount is the sum of the related products.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "ID of a related Campaign. This field is defined only for those organizations that have the campaign feature Campaigns enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "close_date": {"name": "close_date", "description": "Required. Date when the opportunity is expected to close.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Date when the opportunity is was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Text description of the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "expected_revenue": {"name": "expected_revenue", "description": "Read-only field that is equal to the product of the opportunity Amount field and the Probability.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal": {"name": "fiscal", "description": "If fiscal years are not enabled, the name of the fiscal quarter or period in which the opportunity CloseDate falls.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal_quarter": {"name": "fiscal_quarter", "description": "Represents the fiscal quarter. Valid values are 1, 2, 3, or 4.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal_year": {"name": "fiscal_year", "description": "Represents the fiscal year, for example, 2006.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_category": {"name": "forecast_category", "description": "Restricted picklist field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_category_name": {"name": "forecast_category_name", "description": "The name of the forecast category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_open_activity": {"name": "has_open_activity", "description": "Indicates whether an opportunity has an open event or task (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_opportunity_line_item": {"name": "has_opportunity_line_item", "description": "Read-only field that indicates whether the opportunity has associated line items. A value of true means that Opportunity line items have been created for the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_overdue_task": {"name": "has_overdue_task", "description": "Indicates whether an opportunity has an overdue task (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_closed": {"name": "is_closed", "description": "True, if Stage Name Label is Closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_excluded_from_territory_2_filter": {"name": "is_excluded_from_territory_2_filter", "description": "Used for Filter-Based Opportunity Territory Assignment. Indicates whether the opportunity is excluded (True) or included (False) each time the APEX filter is executed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_won": {"name": "is_won", "description": "True, if Stage Name Label is Won.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is one of the following, whichever is the most recent:Due date of the most recent event logged against the record or Due date of the most recently closed task associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_source": {"name": "lead_source", "description": "Source of this opportunity, such as Advertisement or Trade Show.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Required. A name for this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "next_step": {"name": "next_step", "description": "Description of next task in closing opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "ID of the User who has been assigned to work this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "Pricebook2Id": {"name": "Pricebook2Id", "description": "ID of a related Pricebook2 object. The Pricebook2Id field indicates which Pricebook2 applies to this opportunity. The Pricebook2Id field is defined only for those organizations that have products enabled as a feature. You can specify values for only one field (Pricebook2Id or PricebookId)\u2014not both fields. For this reason, both fields are declared nillable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "pricebook_2_id": {"name": "pricebook_2_id", "description": "Unavailable as of version 3.0. As of version 8.0, the Pricebook object is no longer available. Use the Pricebook2Id field instead, specifying the ID of the Pricebook2 record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "probability": {"name": "probability", "description": "Percentage of estimated confidence in closing the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "stage_name": {"name": "stage_name", "description": "Required. Current stage of this record. The StageName field controls several other fields on an opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "synced_quote_id": {"name": "synced_quote_id", "description": "The ID of the Quote that syncs with the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "territory_2_id": {"name": "territory_2_id", "description": "The ID of the territory that is assigned to the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of opportunity. For example, Existing Business or New Business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_opportunity_data\"", "created_at": 1720574246.428588}, "source.salesforce_source.salesforce.user": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "user", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.user", "fqn": ["salesforce_source", "salesforce", "salesforce", "user"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_user_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Represents a user in your organization.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "True, if this field has been deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "about_me": {"name": "about_me", "description": "Information about the user, such as areas of interest or skills.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "ID of the Account associated with a Customer Portal user. This field is null for Salesforce users.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "alias": {"name": "alias", "description": "Required. The user\u2019s alias. For example, jsmith.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "badge_text": {"name": "badge_text", "description": "The community role, displayed on the user profile page just below the user name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "banner_photo_url": {"name": "banner_photo_url", "description": "The URL for the user's banner photo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "call_center_id": {"name": "call_center_id", "description": "If Salesforce CRM Call Center is enabled, represents the call center to which this user is assigned.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "city": {"name": "city", "description": "The city associated with the user. Up to 40 characters allowed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "community_nickname": {"name": "community_nickname", "description": "Name used to identify this user in the Community application, which includes the ideas and answers features.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "company_name": {"name": "company_name", "description": "The name of the user\u2019s company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "contact_id": {"name": "contact_id", "description": "ID of the Contact associated with this account. The contact must have a value in the AccountId field or an error occurs.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "country": {"name": "country", "description": "The country associated with the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "country_code": {"name": "country_code", "description": "The ISO country code associated with the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "default_group_notification_frequency": {"name": "default_group_notification_frequency", "description": "The default frequency for sending the user's Chatter group email notifications when the user joins groups.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "delegated_approver_id": {"name": "delegated_approver_id", "description": "Id of the user who is a delegated approver for this user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "department": {"name": "department", "description": "The company department associated with the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "digest_frequency": {"name": "digest_frequency", "description": "The frequency at which the system sends the user\u2019s Chatter personal email digest.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "division": {"name": "division", "description": "The division associated with this user, similar to Department and unrelated to DefaultDivision.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "Required. The user\u2019s email address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email_encoding_key": {"name": "email_encoding_key", "description": "Required. The email encoding for the user, such as ISO-8859-1 or UTF-8.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email_preferences_auto_bcc": {"name": "email_preferences_auto_bcc", "description": "Determines whether the user receives copies of sent emails. This option applies only if compliance BCC emails are not enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "employee_number": {"name": "employee_number", "description": "The user\u2019s employee number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "extension": {"name": "extension", "description": "The user\u2019s phone extension number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fax": {"name": "fax", "description": "The user\u2019s fax number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "federation_identifier": {"name": "federation_identifier", "description": "Indicates the value that must be listed in the Subject element of a Security Assertion Markup Language (SAML) IDP certificate to authenticate the user for a client application using single sign-on.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The user\u2019s first name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_enabled": {"name": "forecast_enabled", "description": "Indicates whether the user is enabled as a forecast manager (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "full_photo_url": {"name": "full_photo_url", "description": "The URL for the user's profile photo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "geocode_accuracy": {"name": "geocode_accuracy", "description": "The level of accuracy of a location\u2019s geographical coordinates compared with its physical address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "individual_id": {"name": "individual_id", "description": "ID of the data privacy record associated with this user. This field is available if Data Protection and Privacy is enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_active": {"name": "is_active", "description": "Indicates whether the user has access to log in (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_profile_photo_active": {"name": "is_profile_photo_active", "description": "Indicates whether a user has a profile photo (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "language_locale_key": {"name": "language_locale_key", "description": "Required. The user\u2019s language, such as \u201cFrench\u201d or \u201cChinese (Traditional).\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_login_date": {"name": "last_login_date", "description": "The date and time when the user last successfully logged in. This value is updated if 60 seconds have elapsed since the user\u2019s last login.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "Required. The user\u2019s last name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp for when the current user last viewed a record related to this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced (LastReferencedDate) and not viewed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Used with Longitude to specify the precise geolocation of an address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "locale_sid_key": {"name": "locale_sid_key", "description": "Required. This field is a restricted picklist field. The value of the field affects formatting and parsing of values, especially numeric values, in the user interface.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Used with Latitude to specify the precise geolocation of an address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "manager_id": {"name": "manager_id", "description": "The Id of the user who manages this user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "medium_banner_photo_url": {"name": "medium_banner_photo_url", "description": "The URL for the medium-sized user profile banner photo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mobile_phone": {"name": "mobile_phone", "description": "The user\u2019s mobile or cellular phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Concatenation of FirstName and LastName.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "offline_trial_expiration_date": {"name": "offline_trial_expiration_date", "description": "The date and time when the user\u2019s Connect Offline trial expires.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "phone": {"name": "phone", "description": "The user\u2019s phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "postal_code": {"name": "postal_code", "description": "The user\u2019s postal or ZIP code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "profile_id": {"name": "profile_id", "description": "Required. ID of the user\u2019s Profile. Use this value to cache metadata based on profile. In earlier releases, this was RoleId.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "receives_admin_info_emails": {"name": "receives_admin_info_emails", "description": "Indicates whether the user receives email for administrators from Salesforce (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "receives_info_emails": {"name": "receives_info_emails", "description": "Indicates whether the user receives informational email from Salesforce (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sender_email": {"name": "sender_email", "description": "The email address used as the From address when the user sends emails. This address is the same value shown in Setup on the My Email Settings page.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sender_name": {"name": "sender_name", "description": "The name used as the email sender when the user sends emails. This name is the same value shown in Setup on the My Email Settings page.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "signature": {"name": "signature", "description": "The signature text added to emails.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "small_banner_photo_url": {"name": "small_banner_photo_url", "description": "The URL for the small user profile banner photo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "small_photo_url": {"name": "small_photo_url", "description": "The URL for a thumbnail of the user's profile photo.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "state": {"name": "state", "description": "The state associated with the User.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "state_code": {"name": "state_code", "description": "The ISO state code associated with the user.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "street": {"name": "street", "description": "The street address associated with the User.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "time_zone_sid_key": {"name": "time_zone_sid_key", "description": "Required. This field is a restricted picklist field. A User time zone affects the offset used when displaying or entering times in the user interface.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "title": {"name": "title", "description": "The user\u2019s business title, such as \u201cVice President.\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "username": {"name": "username", "description": "Contains the name that a user enters to log in. The value for this field must be in the form of an email address, using all lowercase characters. It must also be unique across all organizations.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "user_role_id": {"name": "user_role_id", "description": "ID of the user\u2019s UserRole.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "user_type": {"name": "user_type", "description": "The category of user license.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_user_data\"", "created_at": 1720574246.428761}, "source.salesforce_source.salesforce.user_role": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "user_role", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.user_role", "fqn": ["salesforce_source", "salesforce", "salesforce", "user_role"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_user_role_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Represents a user role in your organization.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_deleted": {"name": "_fivetran_deleted", "description": "True, if this field has been deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "case_access_for_account_owner": {"name": "case_access_for_account_owner", "description": "The case access level for the account owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "contact_access_for_account_owner": {"name": "contact_access_for_account_owner", "description": "The contact access level for the account owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "developer_name": {"name": "developer_name", "description": "The unique name of the object in the API.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_user_id": {"name": "forecast_user_id", "description": "The ID of the forecast manager associated with this role.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "may_forecast_manager_share": {"name": "may_forecast_manager_share", "description": "Indicates whether the forecast manager can manually share their own forecast.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Required. Name of the role. Corresponds to Label on the user interface.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_access_for_account_owner": {"name": "opportunity_access_for_account_owner", "description": "Required. The opportunity access level for the account owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_role_id": {"name": "parent_role_id", "description": "The ID of the parent role.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "portal_type": {"name": "portal_type", "description": "This value indicates the type of portal for the role", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "rollup_description": {"name": "rollup_description", "description": "Description of the forecast rollup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_user_role_data\"", "created_at": 1720574246.428869}, "source.salesforce_source.salesforce.contact": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "contact", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.contact", "fqn": ["salesforce_source", "salesforce", "salesforce", "contact"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_contact_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Represents a contact, which is a person associated with an account.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "ID of the account that\u2019s the parent of this contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assistant_name": {"name": "assistant_name", "description": "The assistant\u2019s name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "assistant_phone": {"name": "assistant_phone", "description": "The assistant\u2019s telephone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "birthdate": {"name": "birthdate", "description": "The contact\u2019s birthdate.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "department": {"name": "department", "description": "The contact\u2019s department.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "A description of the contact. Label is Contact Description up to 32 KB.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "do_not_call": {"name": "do_not_call", "description": "Indicates that the contact does not want to receive calls.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "The contact\u2019s email address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email_bounced_date": {"name": "email_bounced_date", "description": "If bounce management is activated and an email sent to the contact bounces, the date and time of the bounce.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email_bounced_reason": {"name": "email_bounced_reason", "description": "If bounce management is activated and an email sent to the contact bounces, the reason for the bounce.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fax": {"name": "fax", "description": "The contact\u2019s fax number. Label is Business Fax.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The contact\u2019s first name up to 40 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_opted_out_of_email": {"name": "has_opted_out_of_email", "description": "indicates whether the contact doesn\u2019t want to receive email from Salesforce (true) or does (false). Label is Email Opt Out", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_opted_out_of_fax": {"name": "has_opted_out_of_fax", "description": "Indicates whether the contact prohibits receiving faxes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "home_phone": {"name": "home_phone", "description": "The contact\u2019s home telephone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "individual_id": {"name": "individual_id", "description": "ID of the data privacy record associated with this contact. This field is available if Data Protection and Privacy is enabled. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_email_bounced": {"name": "is_email_bounced", "description": "If bounce management is activated and an email is sent to a contact, indicates whether the email bounced (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "jigsaw": {"name": "jigsaw", "description": "Data.com Key", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "jigsaw_contact_id": {"name": "jigsaw_contact_id", "description": "Jigsaw contact OD", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is the most recent of either: Due date of the most recent event logged against the record. Due date of the most recently closed task associated with the record.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_curequest_date": {"name": "last_curequest_date", "description": "Last Stay-in-Touch Request Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_cuupdate_date": {"name": "last_cuupdate_date", "description": "Last Stay-in-Touch Save Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "Required. Last name of the contact up to 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_source": {"name": "lead_source", "description": "The lead\u2019s source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_city": {"name": "mailing_city", "description": "Mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_country": {"name": "mailing_country", "description": "Mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_country_code": {"name": "mailing_country_code", "description": "The ISO codes for the mailing address\u2019s state and country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_geocode_accuracy": {"name": "mailing_geocode_accuracy", "description": "Accuracy level of the geocode for the mailing address. For details on geolocation compound field", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_latitude": {"name": "mailing_latitude", "description": "Used with MailingLongitude to specify the precise geolocation of a mailing address. Acceptable values are numbers between \u201390 and 90 up to 15 decimal places. For details on geolocation compound fields", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_longitude": {"name": "mailing_longitude", "description": "Used with MailingLatitude to specify the precise geolocation of a mailing address. Acceptable values are numbers between \u2013180 and 180 up to 15 decimal places. For details on geolocation compound fields", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_postal_code": {"name": "mailing_postal_code", "description": "Mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_state": {"name": "mailing_state", "description": "Mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_state_code": {"name": "mailing_state_code", "description": "The ISO codes for the mailing address\u2019s state and country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_street": {"name": "mailing_street", "description": "Street address for mailing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "master_record_id": {"name": "master_record_id", "description": "If this record was deleted as the result of a merge, this field contains the ID of the record that remains. If this record was deleted for any other reason, or has not been deleted, the value is null. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mobile_phone": {"name": "mobile_phone", "description": "Contact\u2019s mobile phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Concatenation of FirstName, MiddleName, LastName, and Suffix up to 203 characters, including whitespaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "other_city": {"name": "other_city", "description": "Alternate address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "other_country": {"name": "other_country", "description": "Alternate address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "other_geocode_accuracy": {"name": "other_geocode_accuracy", "description": "Accuracy level of the geocode for the other address. For details on geolocation compound fields", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "other_latitude": {"name": "other_latitude", "description": "Used with OtherLongitude to specify the precise geolocation of an alternate address. Acceptable values are numbers between \u201390 and 90 up to 15 decimal places. For details on geolocation compound fields", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "other_longitude": {"name": "other_longitude", "description": "Used with OtherLatitude to specify the precise geolocation of an alternate address. Acceptable values are numbers between \u2013180 and 180 up to 15 decimal places. For details on geolocation compound fields", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "other_phone": {"name": "other_phone", "description": "Telephone for alternate address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "other_postal_code": {"name": "other_postal_code", "description": "Alternate address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "other_state": {"name": "other_state", "description": "Alternate address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "other_street": {"name": "other_street", "description": "Street for alternate address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner of the account associated with this contact. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "phone": {"name": "phone", "description": "Telephone number for the contact. Label is Business Phone.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "photo_url": {"name": "photo_url", "description": "'Path to be combined with the URL of a Salesforce instance (Example: https://yourInstance.salesforce.com/) to generate a URL to request the social network profile image associated with the contact. Generated URL returns an HTTP redirect (code 302) to the social network profile image for the contact. Empty if Social Accounts and Contacts isn't enabled or if Social Accounts and Contacts is disabled for the requesting user.'\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reports_to_id": {"name": "reports_to_id", "description": "This field doesn\u2019t appear if IsPersonAccount is true. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "salutation": {"name": "salutation", "description": "Honorific abbreviation, word, or phrase to be used in front of name in greetings, such as Dr. or Mrs.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "system_modstamp": {"name": "system_modstamp", "description": "System Modstamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "title": {"name": "title", "description": "Title", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_contact_data\"", "created_at": 1720574246.429263}, "source.salesforce_source.salesforce.event": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "event", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.event", "fqn": ["salesforce_source", "salesforce", "salesforce", "event"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_event_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Represents an event in the calendar. In the user interface, event and task records are collectively referred to as activities.", "columns": {"id": {"name": "id", "description": "Activity ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "Represents the ID of the related account. The AccountId is determined as follows. If the value of WhatId is any of the following objects, then Salesforce uses that object\u2019s AccountId.\nAccount Opportunity Contract Custom object that is a child of Account If the value of the WhatId field is any other object, and the value of the WhoId field is a contact object, then Salesforce uses that contact\u2019s AccountId. (If your org uses Shared Activities, Salesforce uses the AccountId of the primary contact.)\nOtherwise, Salesforce sets the value of the AccountId field to null.\nFor information on IDs, see ID Field Type.\nThis is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "activity_date": {"name": "activity_date", "description": "Contains the event\u2019s due date if the IsAllDayEvent flag is set to true. This field is a date field with a timestamp that is always set to midnight in the Coordinated Universal Time (UTC) time zone. Don\u2019t attempt to alter the timestamp to account for time zone differences. Label is Due Date Only. This field is required in versions 12.0 and earlier if the IsAllDayEvent flag is set to true.\nThe value for this field and StartDateTime must match, or one of them must be null.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "activity_date_time": {"name": "activity_date_time", "description": "Contains the event\u2019s due date if the IsAllDayEvent flag is set to false. The time portion of this field is always transferred in the Coordinated Universal Time (UTC) time zone. Translate the time portion to or from a local time zone for the user or the application, as appropriate. Label is Due Date Time. This field is required in versions 12.0 and earlier if the IsAllDayEvent flag is set to false.\nThe value for this field and StartDateTime must match, or one of them must be null.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Contains a text description of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "duration_in_minutes": {"name": "duration_in_minutes", "description": "Contains the event length, in minutes\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "end_date": {"name": "end_date", "description": "Read-only. Available in versions 46.0 and later. This field supplies the date value that appears in the EndDateTime field. This field is a date field with a timestamp that is always set to midnight in the Coordinated Universal Time (UTC) time zone.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "end_date_time": {"name": "end_date_time", "description": "Available in versions 13.0 and later. The time portion of this field is always transferred in the Coordinated Universal Time (UTC) time zone. Translate the time portion to or from a local time zone for the user or the application, as appropriate.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "event_subtype": {"name": "event_subtype", "description": "Provides standard subtypes to facilitate creating and searching for events. This field isn\u2019t updateable.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "group_event_type": {"name": "group_event_type", "description": "Group Event Type", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_archived": {"name": "is_archived", "description": "Indicates whether the event has been archived.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_child": {"name": "is_child", "description": "Indicates whether the event is a child of another event (true) or not (false). For a child event, you can update IsReminderSet and ReminderDateTime only. You can query and delete a child event. If the objects related to the child event are different from those objects related to the parent event (this difference is possible if you use API version 25.0 or earlier) and one of the objects related to the child event is deleted, the objects related to the parent event are updated to ensure data integrity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_group_event": {"name": "is_group_event", "description": "Indicates whether the event is a group event\u2014that is, whether it has invitees (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_private": {"name": "is_private", "description": "Indicates whether users other than the creator of the event can (false) or can\u2019t (true) see the event details when viewing the event user\u2019s calendar. However, users with the View All Data or Modify All Data permission can see private events in reports and searches, or when viewing other users\u2019 calendars. Private events can\u2019t be associated with opportunities, accounts, cases, campaigns, contracts, leads, or contacts. Label is Private.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_recurrence": {"name": "is_recurrence", "description": "Indicates whether a Salesforce Classic event is scheduled to repeat itself (true) or only occurs one time (false). This field is read-only when updating records, but not when creating them. If this field value is true, then RecurrenceEndDateOnly, RecurrenceStartDateTime, RecurrenceType, and any recurrence fields associated with the given recurrence type must be populated. Label is Create recurring series of events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_recurrence_2": {"name": "is_recurrence_2", "description": "Read-only. This field available in API version 44.0 and later. Indicates whether a Lightning Experience event is scheduled to repeat (true) or only occurs one time (false). If this field value is true, then Recurrence2PatternText and Recurrence2PatternVersion must be populated. Label is Repeat.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_recurrence_2_exception": {"name": "is_recurrence_2_exception", "description": "Read-only. This field available in API version 44.0 and later. Indicates whether an individual event in a Lightning Experience event series has a recurrence pattern that\u2019s different from the rest of the series, making it an exception.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_recurrence_2_exclusion": {"name": "is_recurrence_2_exclusion", "description": "Read-only. This field available in API version 44.0 and later. Indicates when updates to a Lightning Experience event series recurrence pattern have been made, but affect future event occurrences only. For past event occurrences, IsRecurrence2Exclusion is set to true, excluding past occurrences from the series recurrence pattern.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_reminder_set": {"name": "is_reminder_set", "description": "Indicates whether the activity is a reminder (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "location": {"name": "location", "description": "Contains the location of the event.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "Contains the ID of the user or public calendar who owns the event. Label is Assigned to ID. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_2_pattern_start_date": {"name": "recurrence_2_pattern_start_date", "description": "Read-only. This field available in API version 44.0 and later. Indicates the date and time when the Lightning Experience event series begins. The time portion of this field is always transferred in the Coordinated Universal Time (UTC) time zone. Translate the time portion to or from a local time zone for the user or the application, as appropriate.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_2_pattern_text": {"name": "recurrence_2_pattern_text", "description": "The RRULE that describes the recurrence pattern for Lightning Experience event series. Supports a subset of the RFC 5545 standard for internet calendaring and scheduling. See the Event Series section in this topic for usage examples. This field has a maximum length of 512 characters. This field is available in API version 44.0 and later, and has the Create property in API version 52.0 and later.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_2_pattern_time_zone": {"name": "recurrence_2_pattern_time_zone", "description": "This field available in API version 44.0 and later. Indicates the time zone in which the Lightning Experience event series was created or updated. This field uses standard Java TimeZone IDs. For example, America/Los_Angeles.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_2_pattern_version": {"name": "recurrence_2_pattern_version", "description": "Read-only. This field available in API version 44.0 and later. Indicates the standard specifications for Lightning Experience event series recurrence patterns. The only possible value is 1 (RFC 5545 v4 RRULE)\u2014RFC 5545 is a standard set of specifications for internet calendaring and scheduling that IsRecurrence2 adheres to for series recurrence patterns. RFC 5545 specifications for series recurrence patterns are called RRULES. For examples of rrule usage, see the Event Series section in this topic.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_activity_id": {"name": "recurrence_activity_id", "description": "Read-only. Not required on create. Contains the ID of the main record of the Salesforce Classic recurring event. Subsequent occurrences have the same value in this field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_day_of_month": {"name": "recurrence_day_of_month", "description": "Indicates the day of the month on which the event repeats.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_day_of_week_mask": {"name": "recurrence_day_of_week_mask", "description": "Indicates the day or days of the week on which the Salesforce Classic recurring event repeats. This field contains a bitmask. The values are as follows: Sunday = 1 Monday = 2 Tuesday = 4 Wednesday = 8 Thursday = 16 Friday = 32 Saturday = 64 Multiple days are represented as the sum of their numerical values. For example, Tuesday and Thursday = 4 + 16 = 20.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_end_date_only": {"name": "recurrence_end_date_only", "description": "Indicates the last date on which the event repeats. For multiday Salesforce Classic recurring events, this date is the day on which the last occurrence starts. This field is a date field with a timestamp that is always set to midnight in the Coordinated Universal Time (UTC) time zone. Don\u2019t attempt to alter the timestamp to account for time zone differences.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_instance": {"name": "recurrence_instance", "description": "Indicates the frequency of the Salesforce Classic event\u2019s recurrence. For example, 2nd or 3rd.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_interval": {"name": "recurrence_interval", "description": "Indicates the interval between Salesforce Classic recurring events.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_month_of_year": {"name": "recurrence_month_of_year", "description": "Indicates the month in which the Salesforce Classic recurring event repeats.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_start_date_time": {"name": "recurrence_start_date_time", "description": "Indicates the date and time when the Salesforce Classic recurring event begins. The value must precede the RecurrenceEndDateOnly. The time portion of this field is always transferred in the Coordinated Universal Time (UTC) time zone. Translate the time portion to or from a local time zone for the user or the application, as appropriate.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_time_zone_sid_key": {"name": "recurrence_time_zone_sid_key", "description": "Indicates the time zone associated with a Salesforce Classic recurring event. For example, \u201cUTC-8:00\u201d for Pacific Standard Time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_type": {"name": "recurrence_type", "description": "Indicates how often the Salesforce Classic event repeats. For example, daily, weekly, or every nth month (where \u201cnth\u201d is defined in RecurrenceInstance).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reminder_date_time": {"name": "reminder_date_time", "description": "Represents the time when the reminder is scheduled to fire, if IsReminderSet is set to true. If IsReminderSet is set to false, then the user may have deselected the reminder checkbox in the Salesforce user interface, or the reminder has already fired at the time indicated by the value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "show_as": {"name": "show_as", "description": "Indicates how this event appears when another user views the calendar: Busy, Out of Office, or Free. Label is Show Time As.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "start_date_time": {"name": "start_date_time", "description": "Indicates the start date and time of the event. Available in versions 13.0 and later.\nIf this field has a value, then ActivityDate and ActivityDateTime must either be null or match the value of this field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "subject": {"name": "subject", "description": "The subject line of the event, such as Call, Email, or Meeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "system_modstamp": {"name": "system_modstamp", "description": "System Modstamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "Indicates the event type, such as Call, Email, or Meeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "what_count": {"name": "what_count", "description": "Available if your organization has enabled Shared Activities. Represents the count of related EventRelations pertaining to the WhatId. The count of the WhatId must be 1 or less.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "what_id": {"name": "what_id", "description": "The WhatId represents nonhuman objects such as accounts, opportunities, campaigns, cases, or custom objects. WhatIds are polymorphic. Polymorphic means a WhatId is equivalent to the ID of a related object. The label is Related To ID. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "who_count": {"name": "who_count", "description": "Available to organizations that have Shared Activities enabled. Represents the count of related EventRelations pertaining to the WhoId.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "who_id": {"name": "who_id", "description": "The WhoId represents a human such as a lead or a contact. WhoIds are polymorphic. Polymorphic means a WhoId is equivalent to a contact\u2019s ID or a lead\u2019s ID. The label is Name ID.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_event_data\"", "created_at": 1720574246.429416}, "source.salesforce_source.salesforce.lead": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "lead", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.lead", "fqn": ["salesforce_source", "salesforce", "salesforce", "lead"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_lead_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Represents a prospect or lead.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "annual_revenue": {"name": "annual_revenue", "description": "Annual revenue for the lead\u2019s company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "city": {"name": "city", "description": "City for the lead\u2019s address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "company": {"name": "company", "description": "Required. The lead\u2019s company.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "converted_account_id": {"name": "converted_account_id", "description": "Object reference ID that points to the account into which the lead converted. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "converted_contact_id": {"name": "converted_contact_id", "description": "Object reference ID that points to the contact into which the lead converted. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "converted_date": {"name": "converted_date", "description": "Date on which this lead was converted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "converted_opportunity_id": {"name": "converted_opportunity_id", "description": "Object reference ID that points to the opportunity into which the lead has been converted. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "country": {"name": "country", "description": "The lead\u2019s country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "country_code": {"name": "country_code", "description": "The ISO country code for the lead\u2019s address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "The lead\u2019s description.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "The lead\u2019s email address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email_bounced_date": {"name": "email_bounced_date", "description": "If bounce management is activated and an email sent to the lead bounced, the date and time of the bounce.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email_bounced_reason": {"name": "email_bounced_reason", "description": "If bounce management is activated and an email sent to the lead bounced, the reason for the bounce.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fax": {"name": "fax", "description": "The lead\u2019s fax number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The lead\u2019s first name up to 40 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "geocode_accuracy": {"name": "geocode_accuracy", "description": "Accuracy level of the geocode for the address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_opted_out_of_email": {"name": "has_opted_out_of_email", "description": "Indicates whether the lead doesn\u2019t want to receive email from Salesforce (true) or does (false). Label is Email Opt Out.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "individual_id": {"name": "individual_id", "description": "ID of the data privacy record associated with this lead. This field is available if you enabled Data Protection and Privacy in Setup.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "industry": {"name": "industry", "description": "Industry in which the lead works.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_converted": {"name": "is_converted", "description": "Indicates whether the lead has been converted (true) or not (false). Label is Converted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_unread_by_owner": {"name": "is_unread_by_owner", "description": "If true, lead has been assigned, but not yet viewed. See Unread Leads for more information. Label is Unread By Owner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "jigsaw_contact_id": {"name": "jigsaw_contact_id", "description": "Jigsaw Contact ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "'Value is the most recent of either: Due date of the most recent event logged against the record. Due date of the most recently closed task associated with the record.'\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "Required. Last name of the lead up to 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "Used with Longitude to specify the precise geolocation of an address. Acceptable values are numbers between \u201390 and 90 up to 15 decimal places.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_source": {"name": "lead_source", "description": "The lead\u2019s source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "Used with Latitude to specify the precise geolocation of an address. Acceptable values are numbers between \u2013180 and 180 up to 15 decimal places.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "master_record_id": {"name": "master_record_id", "description": "If this record was deleted as the result of a merge, this field contains the ID of the record that was kept. If this record was deleted for any other reason, or has not been deleted, the value is null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mobile_phone": {"name": "mobile_phone", "description": "The lead\u2019s mobile phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Concatenation of FirstName, MiddleName, LastName, and Suffix up to 203 characters, including whitespaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "number_of_employees": {"name": "number_of_employees", "description": "Number of employees at the lead\u2019s company. Label is Employees.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "ID of the lead\u2019s owner. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "phone": {"name": "phone", "description": "The lead\u2019s phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "photo_url": {"name": "photo_url", "description": "Path to be combined with the URL of a Salesforce instance", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "postal_code": {"name": "postal_code", "description": "Postal code for the address of the lead. Label is Zip/Postal Code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "salutation": {"name": "salutation", "description": "Salutation for the lead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "state": {"name": "state", "description": "State for the address of the lead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "state_code": {"name": "state_code", "description": "The ISO state code for the lead\u2019s address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"name": "status", "description": "Status code for this converted lead. Status codes are defined in Status and represented in the API by the LeadStatus object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "street": {"name": "street", "description": "Street number and name for the address of the lead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "system_modstamp": {"name": "system_modstamp", "description": "System Modstamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "title": {"name": "title", "description": "Title for the lead, such as CFO or CEO.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "website": {"name": "website", "description": "Website for the lead.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_lead_data\"", "created_at": 1720574246.4295669}, "source.salesforce_source.salesforce.opportunity_line_item": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "opportunity_line_item", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.opportunity_line_item", "fqn": ["salesforce_source", "salesforce", "salesforce", "opportunity_line_item"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_opportunity_line_item_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Represents an opportunity line item, which is a member of the list of Product2 products associated with an Opportunity.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Text description of the opportunity line item.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "discount": {"name": "discount", "description": "Discount for the product as a percentage. When updating these records: If you specify Discount without specifying TotalPrice, the TotalPrice is adjusted to accommodate the new Discount value, and the UnitPrice is held constant. If you specify both Discount and Quantity, you must also specify either TotalPrice or UnitPrice so the system knows which one to automatically adjust.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_quantity_schedule": {"name": "has_quantity_schedule", "description": "Read-only. Indicates whether a quantity schedule has been created for this object (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_revenue_schedule": {"name": "has_revenue_schedule", "description": "Indicates whether a revenue schedule has been created for this object (true) or not (false). If this object has a revenue schedule, the Quantity and TotalPrice fields can\u2019t be updated. In addition, the Quantity field can\u2019t be updated if this object has a quantity schedule. Update requests aren\u2019t rejected but the updated values are ignored.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_schedule": {"name": "has_schedule", "description": "If either HasQuantitySchedule or HasRevenueSchedule is true, this field is also true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp for when the current user last viewed a record related to this record. Available in API version 50.0 and later.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced (LastReferencedDate) and not viewed. Available in API version 50.0 and later.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "list_price": {"name": "list_price", "description": "Corresponds to the UnitPrice on the PricebookEntry that is associated with this line item, which can be in the standard price book or a custom price book. A client application can use this information to show whether the unit price (or sales price) of the line item differs from the price book entry list price.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "The opportunity line item name (known as \u201cOpportunity Product\u201d in the user interface). This read-only field is available in API version 30.0 and later.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_id": {"name": "opportunity_id", "description": "Required. ID of the associated Opportunity. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "pricebook_entry_id": {"name": "pricebook_entry_id", "description": "Required. ID of the associated PricebookEntry. Exists only for those organizations that have Products enabled as a feature. In API versions 1.0 and 2.0, you can specify values for either this field or ProductId, but not both. For this reason, both fields are declared nillable. In API version 3.0 and later, you must specify values for this field instead of ProductId. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "product_2_id": {"name": "product_2_id", "description": "The ID of the related Product2 record. This is a read-only field available in API version 30.0 and later. Use the PricebookEntryId field instead, specifying the ID of the PricebookEntry record.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "product_code": {"name": "product_code", "description": "This read-only field is available in API version 30.0 and later. It references the value in the ProductCode field of the related Product2 record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "quantity": {"name": "quantity", "description": "Read-only if this record has a quantity schedule, a revenue schedule, or both a quantity and a revenue schedule. When updating these records: If you specify Quantity without specifying the UnitPrice, the UnitPrice value will be adjusted to accommodate the new Quantity value, and the TotalPrice will be held constant. If you specify both Discount and Quantity, you must also specify either TotalPrice or UnitPrice so the system can determine which one to automatically adjust.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "service_date": {"name": "service_date", "description": "Date when the product revenue will be recognized and the product quantity will be shipped. Opportunity Close Date\u2014ServiceDate is ignored. Product Date\u2014ServiceDate is used if not null. Schedule Date\u2014ServiceDate is used if not null and there are no revenue schedules present for this line item, that is, there are no OpportunityLineItemSchedule records with a field Type value of Revenue that are children of this record.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "sort_order": {"name": "sort_order", "description": "Number indicating the sort order selected by the user. Client applications can use this to match the sort order in Salesforce.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "system_modstamp": {"name": "system_modstamp", "description": "System Modstamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "total_price": {"name": "total_price", "description": "This field is available only for backward compatibility. It represents the total price of the OpportunityLineItem. If you do not specify UnitPrice, this field is required. If you specify Discount and Quantity, this field or UnitPrice is required. When updating these records, you can change either this value or the UnitPrice, but not both at the same time.\nThis field is nullable, but you can\u2019t set both TotalPrice and UnitPrice to null in the same update request. To insert the TotalPrice via the API (given only a unit price and the quantity), calculate this field as the unit price multiplied by the quantity. This field is read-only if the opportunity line item has a revenue schedule. If the opportunity line item does not have a schedule or only has quantity schedule, this field can be updated.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "unit_price": {"name": "unit_price", "description": "The unit price for the opportunity line item. In the Salesforce user interface, this field\u2019s value is calculated by dividing the total price of the opportunity line item by the quantity listed for that line item. Label is Sales Price. This field or TotalPrice is required. You can\u2019t specify both.\nIf you specify Discount and Quantity, this field or TotalPrice is required.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_opportunity_line_item_data\"", "created_at": 1720574246.429683}, "source.salesforce_source.salesforce.order": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "order", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.order", "fqn": ["salesforce_source", "salesforce", "salesforce", "order"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_order_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Represents an order associated with a contract or an account.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "Required. ID of the Account associated with this order. Can only be updated when the order\u2019s StatusCode value is Draft. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "activated_by_id": {"name": "activated_by_id", "description": "ID of the User who activated this order. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "activated_date": {"name": "activated_date", "description": "Date and time when the order was activated.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_city": {"name": "billing_city", "description": "City for the billing address for this order. Maximum size is 40 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_country": {"name": "billing_country", "description": "Country for the billing address for this order. Maximum size is 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_country_code": {"name": "billing_country_code", "description": "ISO country code for the billing address for this order.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_geocode_accuracy": {"name": "billing_geocode_accuracy", "description": "Accuracy level of the geocode of the address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_latitude": {"name": "billing_latitude", "description": "Used with BillingLongitude to specify the precise geolocation of a billing address. Acceptable values are numbers between \u201390 and 90 with up to 15 decimal places.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_longitude": {"name": "billing_longitude", "description": "Used with BillingLatitude to specify the precise geolocation of a billing address. Acceptable values are numbers between \u2013180 and 180 with up to 15 decimal places.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_postal_code": {"name": "billing_postal_code", "description": "Postal code for the billing address for this order. Maximum size is 20 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_state": {"name": "billing_state", "description": "State for the billing address for this order. Maximum size is 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_state_code": {"name": "billing_state_code", "description": "ISO state code for the order\u2019s billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_street": {"name": "billing_street", "description": "Street address for the billing address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "company_authorized_by_id": {"name": "company_authorized_by_id", "description": "ID of the user who authorized the account associated with the order. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "contract_id": {"name": "contract_id", "description": "ID of the contract associated with this order. Can only be updated when the order\u2019s StatusCode value is Draft. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "customer_authorized_by_id": {"name": "customer_authorized_by_id", "description": "ID of the contact who authorized the order. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Description of the order.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "effective_date": {"name": "effective_date", "description": "Date at which the order becomes effective. Label is Order Start Date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "end_date": {"name": "end_date", "description": "Date at which the order ends. Label is Order End Date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_reduction_order": {"name": "is_reduction_order", "description": "Read-only. Determines whether an order is a reduction order. Label is Reduction Order.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_id": {"name": "opportunity_id", "description": "ID for the opportunity that\u2019s associated with this order.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "order_number": {"name": "order_number", "description": "Order number assigned to this order (not the unique, system-generated ID assigned during creation). Maximum size is 30 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "original_order_id": {"name": "original_order_id", "description": "Optional. ID of the original order that a reduction order is reducing, if the reduction order is reducing a single order. Label is Original Order. Editable only if isReductionOrder is true. If the reduction order is reducing more than one order, leave blank. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "Required. ID of the User or queue that owns this order. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "pricebook_2_id": {"name": "pricebook_2_id", "description": "Required. ID of the price book associated with this order. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_city": {"name": "shipping_city", "description": "City of the shipping address. Maximum size is 40 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_country": {"name": "shipping_country", "description": "Country of the shipping address. Maximum size is 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_country_code": {"name": "shipping_country_code", "description": "ISO country code for the order\u2019s shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_geocode_accuracy": {"name": "shipping_geocode_accuracy", "description": "Accuracy level of the geocode of the shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_latitude": {"name": "shipping_latitude", "description": "Used with ShippingLongitude to specify the precise geolocation of a shipping address. Acceptable values are numbers between \u201390 and 90 with up to 15 decimal places.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_longitude": {"name": "shipping_longitude", "description": "Used with ShippingLatitude to specify the precise geolocation of an address. Acceptable values are numbers between \u2013180 and 180 with up to 15 decimal places.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_postal_code": {"name": "shipping_postal_code", "description": "Postal code of the shipping address. Maximum size is 20 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_state": {"name": "shipping_state", "description": "State of the shipping address. Maximum size is 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_state_code": {"name": "shipping_state_code", "description": "ISO state code for the order\u2019s shipping address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_street": {"name": "shipping_street", "description": "Street address of the shipping address. Maximum of 255 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"name": "status", "description": "Picklist of values that indicate order status. Each value is within one of two status categories defined in StatusCode. For example, the status picklist might contain Draft, Ready for Review, and Ready for Activation values with a StatusCode of Draft.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status_code": {"name": "status_code", "description": "The status category for the order. An order can be either Draft or Activated. Label is Status Category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "system_modstamp": {"name": "system_modstamp", "description": "System Modstamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "total_amount": {"name": "total_amount", "description": "The total amount for the order products associated with this order. This field is available in API v48.0 and later.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "If you want to show more information about your order, you can add custom values to the Type picklist. By default, the Type field doesn't perform any actions or show any values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_order_data\"", "created_at": 1720574246.429848}, "source.salesforce_source.salesforce.product_2": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "product_2", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.product_2", "fqn": ["salesforce_source", "salesforce", "salesforce", "product_2"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_product_2_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Represents a product that your company sells.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "A text description of this record. Label is Product Description.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "display_url": {"name": "display_url", "description": "URL leading to a specific version of a record in the linked external data source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "external_data_source_id": {"name": "external_data_source_id", "description": "ID of the related external data source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "external_id": {"name": "external_id", "description": "The unique identifier of a record in the linked external data source. For example, ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "family": {"name": "family", "description": "Name of the product family associated with this record. Product families are configured as picklists in the user interface. To obtain a list of valid values, call describeSObjects() and process the DescribeSObjectResult for the values associated with the Family field. Label is Product Family.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_active": {"name": "is_active", "description": "Indicates whether this record is active (true) or not (false). Inactive Product2 records are hidden in many areas in the user interface. You can change the IsActive flag on a Product2 object as often as necessary. Label is Active.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_archived": {"name": "is_archived", "description": "Describes whether the product is archived. The default value is false.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Required. Default name of this record. Label is Product Name.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "number_of_quantity_installments": {"name": "number_of_quantity_installments", "description": "If the product has a quantity schedule, the number of installments.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "number_of_revenue_installments": {"name": "number_of_revenue_installments", "description": "If the product has a revenue schedule, the number of installments.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "product_code": {"name": "product_code", "description": "Default product code for this record. Your org defines the product code naming pattern.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "quantity_installment_period": {"name": "quantity_installment_period", "description": "If the product has a quantity schedule, the amount of time covered by the schedule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "quantity_schedule_type": {"name": "quantity_schedule_type", "description": "The type of the quantity schedule, if the product has one.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "quantity_unit_of_measure": {"name": "quantity_unit_of_measure", "description": "Unit of the product; for example, kilograms, liters, or cases. This field comes with only one value, Each, so consider creating your own. The QuantityUnitOfMeasure field on ProductItem inherits this field\u2019s values.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "revenue_installment_period": {"name": "revenue_installment_period", "description": "If the product has a revenue schedule, the time period covered by the schedule.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "revenue_schedule_type": {"name": "revenue_schedule_type", "description": "The type of the revenue schedule, if the product has one.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "stock_keeping_unit": {"name": "stock_keeping_unit", "description": "The SKU for the product. Use in tandem with or instead of the ProductCode field. For example, you can track the manufacturer\u2019s identifying code in the Product Code field and assign the product a SKU when you resell it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "system_modstamp": {"name": "system_modstamp", "description": "System Modstamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_product_2_data\"", "created_at": 1720574246.429966}, "source.salesforce_source.salesforce.task": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "task", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.task", "fqn": ["salesforce_source", "salesforce", "salesforce", "task"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "sf_task_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": null, "external": null, "description": "Represents a business activity such as making a phone call or other to-do items. In the user interface, Task and Event records are collectively referred to as activities.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "True if record is active, used to filter out only active records if History Mode is enabled", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "Represents the ID of the related Account. The AccountId is determined as follows. If the value of WhatId is any of the following objects, then Salesforce uses that object\u2019s AccountId. Account Opportunity Contract Custom object that is a child of Account If the value of the WhatIdfield is any other object, and the value of the WhoId field is a Contact object, then Salesforce uses that contact\u2019s AccountId. (If your organization uses Shared Activities, then Salesforce uses the AccountId of the primary contact.) Otherwise, Salesforce sets the value of the AccountId field to null. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "activity_date": {"name": "activity_date", "description": "Represents the due date of the task. This field has a timestamp that is always set to midnight in the Coordinated Universal Time (UTC) time zone. The timestamp is not relevant; do not attempt to alter it to accommodate time zone differences. Label is Due Date.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "call_disposition": {"name": "call_disposition", "description": "Represents the result of a given call, for example, \u201cwe'll call back,\u201d or \u201ccall unsuccessful.\u201d Limit is 255 characters. Not subject to field-level security, available for any user in an organization with Salesforce CRM Call Center.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "call_duration_in_seconds": {"name": "call_duration_in_seconds", "description": "Duration of the call in seconds. Not subject to field-level security, available for any user in an organization with Salesforce CRM Call Center.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "call_object": {"name": "call_object", "description": "Name of a call center. Limit is 255 characters. Not subject to field-level security, available for any user in an organization with Salesforce CRM Call Center.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "call_type": {"name": "call_type", "description": "The type of call being answered: Inbound, Internal, or Outbound.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "completed_date_time": {"name": "completed_date_time", "description": "The date and time the task was saved with a Closed status. For insert, if the task is saved with a Closed status the field is set. If the task is saved with an Open status the field is set to NULL. For update, if the task is saved with a new Closed status, the field is reset. If the task is saved with a new non-closed status, the field is reset to NULL. If the task is saved with the same closed status (that is, unchanged) there is no change to the field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_by_id": {"name": "created_by_id", "description": "Created By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Created Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Contains a text description of the task.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_archived": {"name": "is_archived", "description": "Indicates whether the event has been archived.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_closed": {"name": "is_closed", "description": "Indicates whether the task has been completed (true) or not (false). Is only set indirectly via the Status picklist. Label is Closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Deleted", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_high_priority": {"name": "is_high_priority", "description": "Indicates a high-priority task. This field is derived from the Priority field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_recurrence": {"name": "is_recurrence", "description": "Indicates whether the task is scheduled to repeat itself (true) or only occurs once (false). This field is read-only on update, but not on create. If this field value is true, then RecurrenceStartDateOnly, RecurrenceEndDateOnly, RecurrenceType, and any recurrence fields associated with the given recurrence type must be populated. See Recurring Tasks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_reminder_set": {"name": "is_reminder_set", "description": "Indicates whether a popup reminder has been set for the task (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "ID of the User or Group who owns the record. Label is Assigned To ID. This field accepts Groups of type Queue only. In the user interface, Group IDs correspond with the queue\u2019s list view names. To create or update tasks assigned to Group, use v48.0 or later. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "priority": {"name": "priority", "description": "Required. Indicates the importance or urgency of a task, such as high or low.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_activity_id": {"name": "recurrence_activity_id", "description": "Read-only. Not required on create. ID of the main record of the recurring task. Subsequent occurrences have the same value in this field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_day_of_month": {"name": "recurrence_day_of_month", "description": "The day of the month in which the task repeats.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_day_of_week_mask": {"name": "recurrence_day_of_week_mask", "description": "The day or days of the week on which the task repeats. This field contains a bitmask. The values are as follows: Sunday = 1 Monday = 2 Tuesday = 4 Wednesday = 8 Thursday = 16 Friday = 32 Saturday = 64 Multiple days are represented as the sum of their numerical values. For example, Tuesday and Thursday = 4 + 16 = 20.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_end_date_only": {"name": "recurrence_end_date_only", "description": "The last date on which the task repeats. This field has a timestamp that is always set to midnight in the Coordinated Universal Time (UTC) time zone. The timestamp is not relevant; do not attempt to alter it to accommodate time zone differences. ", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_instance": {"name": "recurrence_instance", "description": "The frequency of the recurring task. Possible values are: First\u20141st Fourth\u20144th Last\u2014last Second\u20142nd Third\u20143rd", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_interval": {"name": "recurrence_interval", "description": "The interval between recurring tasks.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_month_of_year": {"name": "recurrence_month_of_year", "description": "The month of the year in which the task repeats.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_regenerated_type": {"name": "recurrence_regenerated_type", "description": "Represents what triggers a repeating task to repeat. Add this field to a page layout together with the RecurrenceInterval field, which determines the number of days between the triggering date (due date or close date) and the due date of the next repeating task in the series. Label is Repeat This Task. This field has the following picklist values: None: The task doesn\u2019t repeat. After due date: The next repeating task will be due the specified number of days after the current task\u2019s due date. After the task is closed: The next repeating task will be due the specified number of days after the current task is closed. (Task closed): This task, now closed, was opened as part of a repeating series. ", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_start_date_only": {"name": "recurrence_start_date_only", "description": "The date when the recurring task begins. Must be a date and time before RecurrenceEndDateOnly.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_time_zone_sid_key": {"name": "recurrence_time_zone_sid_key", "description": "The time zone associated with the recurring task. For example, \u201cUTC-8:00\u201d for Pacific Standard Time.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "recurrence_type": {"name": "recurrence_type", "description": "Indicates how often the task repeats. For example, daily, weekly, or every nth month (where \u201cnth\u201d is defined in RecurrenceInstance).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reminder_date_time": {"name": "reminder_date_time", "description": "Represents the time when the reminder is scheduled to fire, if IsReminderSet is set to true. If IsReminderSet is set to false, then the user may have deselected the reminder checkbox in the Salesforce user interface, or the reminder has already fired at the time indicated by the value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "status": {"name": "status", "description": "Required. The status of the task, such as In Progress or Completed. Each predefined Status field implies a value for the IsClosed flag. To obtain picklist values, query the TaskStatus object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "subject": {"name": "subject", "description": "The subject line of the task, such as \u201cCall\u201d or \u201cSend Quote.\u201d", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "system_modstamp": {"name": "system_modstamp", "description": "System Modstamp", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "task_subtype": {"name": "task_subtype", "description": "Provides standard subtypes to facilitate creating and searching for specific task subtypes.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "The type of task, such as Call or Meeting.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "what_count": {"name": "what_count", "description": "Available to organizations that have Shared Activities enabled. Count of related TaskRelations pertaining to WhatId. Count of the WhatId must be 1 or less.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "what_id": {"name": "what_id", "description": "The WhatId represents nonhuman objects such as accounts, opportunities, campaigns, cases, or custom objects. WhatIds are polymorphic. Polymorphic means a WhatId is equivalent to the ID of a related object. The label is Related To ID. This is a polymorphic relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "who_count": {"name": "who_count", "description": "Available to organizations that have Shared Activities enabled. Count of related TaskRelations pertaining to WhoId.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "who_id": {"name": "who_id", "description": "The WhoId represents a human such as a lead or a contact. WhoIds are polymorphic. Polymorphic means a WhoId is equivalent to a contact\u2019s ID or a lead\u2019s ID. The label is Name ID. If Shared Activities is enabled, the value of this field is the ID of the related lead or primary contact. If you add, update, or remove the WhoId field, you might encounter problems with triggers, workflows, and data validation rules that are associated with the record. The label is Name ID. Beginning in API version 37.0, if the contact or lead ID in the WhoId field is not in the TaskWhoIds list, no error occurs and the ID is added to the TaskWhoIds as the primary WhoId. If WhoId is set to null, an arbitrary ID from the existing TaskWhoIds list is promoted to the primary position.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_task_data\"", "created_at": 1720574246.4301062}, "source.salesforce_source.salesforce.fivetran_formula": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "fivetran_formula", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.fivetran_formula", "fqn": ["salesforce_source", "salesforce", "salesforce", "fivetran_formula"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "fivetran_formula", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 24, "period": "hour"}, "error_after": {"count": 48, "period": "hour"}, "filter": null}, "external": null, "description": "Holds the formula fields for each of your custom fields", "columns": {}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"fivetran_formula\"", "created_at": 1720574246.4301922}, "source.salesforce_source.salesforce.fivetran_formula_model": {"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "fivetran_formula_model", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce/src_salesforce.yml", "original_file_path": "models/salesforce/src_salesforce.yml", "unique_id": "source.salesforce_source.salesforce.fivetran_formula_model", "fqn": ["salesforce_source", "salesforce", "salesforce", "fivetran_formula_model"], "source_name": "salesforce", "source_description": "", "loader": "fivetran", "identifier": "fivetran_formula_model", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 24, "period": "hour"}, "error_after": {"count": 48, "period": "hour"}, "filter": null}, "external": null, "description": "Holds the formula fields for each of your salesforce objects as a single select statement", "columns": {}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": true}, "patch_path": null, "unrendered_config": {}, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"fivetran_formula_model\"", "created_at": 1720574246.4302762}}, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.906692, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.90691, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9070232, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.907132, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.907238, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.908766, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.909131, "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 with relation as (\n select\n pg_rewrite.ev_class as class,\n pg_rewrite.oid as id\n from pg_rewrite\n ),\n class as (\n select\n oid as id,\n relname as name,\n relnamespace as schema,\n relkind as kind\n from pg_class\n ),\n dependency as (\n select distinct\n pg_depend.objid as id,\n pg_depend.refobjid as ref\n from pg_depend\n ),\n schema as (\n select\n pg_namespace.oid as id,\n pg_namespace.nspname as name\n from pg_namespace\n where nspname != 'information_schema' and nspname not like 'pg\\_%'\n ),\n referenced as (\n select\n relation.id AS id,\n referenced_class.name ,\n referenced_class.schema ,\n referenced_class.kind\n from relation\n join class as referenced_class on relation.class=referenced_class.id\n where referenced_class.kind in ('r', 'v', 'm')\n ),\n relationships as (\n select\n referenced.name as referenced_name,\n referenced.schema as referenced_schema_id,\n dependent_class.name as dependent_name,\n dependent_class.schema as dependent_schema_id,\n referenced.kind as kind\n from referenced\n join dependency on referenced.id=dependency.id\n join class as dependent_class on dependency.ref=dependent_class.id\n where\n (referenced.name != dependent_class.name or\n referenced.schema != dependent_class.schema)\n )\n\n select\n referenced_schema.name as referenced_schema,\n relationships.referenced_name as referenced_name,\n dependent_schema.name as dependent_schema,\n relationships.dependent_name as dependent_name\n from relationships\n join schema as dependent_schema on relationships.dependent_schema_id=dependent_schema.id\n join schema as referenced_schema on relationships.referenced_schema_id=referenced_schema.id\n group by referenced_schema, referenced_name, dependent_schema, dependent_name\n order by referenced_schema, referenced_name, dependent_schema, dependent_name;\n\n {%- endcall -%}\n\n {{ return(load_result('relations').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574244.909864, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.910003, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.918869, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.919353, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.919657, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9199638, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9204109, "supported_languages": null}, "macro.dbt_postgres.postgres__list_relations_without_caching": {"name": "postgres__list_relations_without_caching", "resource_type": "macro", "package_name": "dbt_postgres", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_postgres.postgres__list_relations_without_caching", "macro_sql": "{% macro postgres__list_relations_without_caching(schema_relation) %}\n {% call statement('list_relations_without_caching', fetch_result=True) -%}\n select\n '{{ schema_relation.database }}' as database,\n tablename as name,\n schemaname as schema,\n 'table' as type\n from pg_tables\n where schemaname ilike '{{ schema_relation.schema }}'\n union all\n select\n '{{ schema_relation.database }}' as database,\n viewname as name,\n schemaname as schema,\n 'view' as type\n from pg_views\n where schemaname ilike '{{ schema_relation.schema }}'\n union all\n select\n '{{ schema_relation.database }}' as database,\n matviewname as name,\n schemaname as schema,\n 'materialized_view' as type\n from pg_matviews\n where schemaname ilike '{{ schema_relation.schema }}'\n {% endcall %}\n {{ return(load_result('list_relations_without_caching').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574244.920901, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.921071, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.921398, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9217658, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9225469, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.922731, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.923035, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.92329, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.923685, "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 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}, "patch_path": null, "arguments": [], "created_at": 1720574244.923894, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.924452, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.924643, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.924758, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9249358, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.92507, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.925432, "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 update {{ target }}\n set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to\n from {{ source }} as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.dbt_scd_id::text = {{ target }}.dbt_scd_id::text\n and DBT_INTERNAL_SOURCE.dbt_change_type::text in ('update'::text, 'delete'::text)\n and {{ target }}.dbt_valid_to is null;\n\n insert into {{ target }} ({{ insert_cols_csv }})\n select {% for column in insert_cols -%}\n DBT_INTERNAL_SOURCE.{{ column }} {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n from {{ source }} as DBT_INTERNAL_SOURCE\n where DBT_INTERNAL_SOURCE.dbt_change_type::text = 'insert'::text;\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574244.926126, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.926265, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.926545, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.926676, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.92684, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.927768, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.928264, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.92854, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9289541, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.929089, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9297469, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.929918, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.930045, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.930571, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9307368, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9309409, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.931533, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9346828, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9348328, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.935301, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.935683, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9367008, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9368908, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.937027, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.937162, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9372969, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.937648, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.937927, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.938209, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.938634, "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 merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on DBT_INTERNAL_SOURCE.dbt_scd_id = DBT_INTERNAL_DEST.dbt_scd_id\n\n when matched\n and DBT_INTERNAL_DEST.dbt_valid_to is null\n and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete')\n then update\n set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to\n\n when not matched\n and DBT_INTERNAL_SOURCE.dbt_change_type = 'insert'\n then insert ({{ insert_cols_csv }})\n values ({{ insert_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574244.938893, "supported_languages": null}, "macro.dbt.strategy_dispatch": {"name": "strategy_dispatch", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "unique_id": "macro.dbt.strategy_dispatch", "macro_sql": "{% macro strategy_dispatch(name) -%}\n{% set original_name = name %}\n {% if '.' in name %}\n {% set package_name, name = name.split(\".\", 1) %}\n {% else %}\n {% set package_name = none %}\n {% endif %}\n\n {% if package_name is none %}\n {% set package_context = context %}\n {% elif package_name in context %}\n {% set package_context = context[package_name] %}\n {% else %}\n {% set error_msg %}\n Could not find package '{{package_name}}', called with '{{original_name}}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n\n {%- set search_name = 'snapshot_' ~ name ~ '_strategy' -%}\n\n {% if search_name not in package_context %}\n {% set error_msg %}\n The specified strategy macro '{{name}}' was not found in package '{{ package_name }}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n {{ return(package_context[search_name]) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574244.942359, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.942521, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.942729, "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, config, target_exists) %}\n {% set primary_key = config['unique_key'] %}\n {% set updated_at = config['updated_at'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n\n {#/*\n The snapshot relation might not have an {{ updated_at }} value if the\n snapshot strategy is changed from `check` to `timestamp`. We\n should use a dbt-created column for the comparison in the snapshot\n table instead of assuming that the user-supplied {{ updated_at }}\n will be present in the historical data.\n\n See https://github.com/dbt-labs/dbt-core/issues/2350\n */ #}\n {% set row_changed_expr -%}\n ({{ snapshotted_rel }}.dbt_valid_from < {{ current_rel }}.{{ updated_at }})\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes\n }) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574244.9434009, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.94356, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9437199, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.94502, "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, config, target_exists) %}\n {% set check_cols_config = config['check_cols'] %}\n {% set primary_key = config['unique_key'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n {% set updated_at = config.get('updated_at', snapshot_get_time()) %}\n\n {% set column_added = false %}\n\n {% set column_added, check_cols = snapshot_check_all_get_existing_columns(node, target_exists, check_cols_config) %}\n\n {%- set row_changed_expr -%}\n (\n {%- if column_added -%}\n {{ get_true_sql() }}\n {%- else -%}\n {%- for col in check_cols -%}\n {{ snapshotted_rel }}.{{ col }} != {{ current_rel }}.{{ col }}\n or\n (\n (({{ snapshotted_rel }}.{{ col }} is null) and not ({{ current_rel }}.{{ col }} is null))\n or\n ((not {{ snapshotted_rel }}.{{ col }} is null) and ({{ current_rel }}.{{ col }} is null))\n )\n {%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n {%- endif -%}\n )\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes\n }) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt.snapshot_check_all_get_existing_columns", "macro.dbt.get_true_sql", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574244.946273, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9503438, "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 }} add column \"{{ column.name }}\" {{ column.data_type }};\n {% endcall %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574244.950609, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.950769, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9508538, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9509912, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9510999, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.951295, "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\n with snapshot_query as (\n\n {{ source_sql }}\n\n ),\n\n snapshotted_data as (\n\n select *,\n {{ strategy.unique_key }} as dbt_unique_key\n\n from {{ target_relation }}\n where dbt_valid_to is null\n\n ),\n\n insertions_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to,\n {{ strategy.scd_id }} as dbt_scd_id\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n {{ strategy.updated_at }} as dbt_valid_to\n\n from snapshot_query\n ),\n\n {%- if strategy.invalidate_hard_deletes %}\n\n deletes_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key\n from snapshot_query\n ),\n {% endif %}\n\n insertions as (\n\n select\n 'insert' as dbt_change_type,\n source_data.*\n\n from insertions_source_data as source_data\n left outer join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where snapshotted_data.dbt_unique_key is null\n or (\n snapshotted_data.dbt_unique_key is not null\n and (\n {{ strategy.row_changed }}\n )\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.dbt_scd_id\n\n from updates_source_data as source_data\n join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where (\n {{ strategy.row_changed }}\n )\n )\n\n {%- if strategy.invalidate_hard_deletes -%}\n ,\n\n deletes as (\n\n select\n 'delete' as dbt_change_type,\n source_data.*,\n {{ snapshot_get_time() }} as dbt_valid_from,\n {{ snapshot_get_time() }} as dbt_updated_at,\n {{ snapshot_get_time() }} as dbt_valid_to,\n snapshotted_data.dbt_scd_id\n\n from snapshotted_data\n left join deletes_source_data as source_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where source_data.dbt_unique_key is null\n )\n {%- endif %}\n\n select * from insertions\n union all\n select * from updates\n {%- if strategy.invalidate_hard_deletes %}\n union all\n select * from deletes\n {%- endif %}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574244.952126, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.952308, "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\n select *,\n {{ strategy.scd_id }} as dbt_scd_id,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to\n from (\n {{ sql }}\n ) sbq\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574244.9525461, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9529479, "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 {%- set config = model['config'] -%}\n\n {%- set target_table = model.get('alias', model.get('name')) -%}\n\n {%- set strategy_name = config.get('strategy') -%}\n {%- set unique_key = config.get('unique_key') %}\n -- grab current tables grants config for comparision later on\n {%- set grant_config = config.get('grants') -%}\n\n {% set target_relation_exists, target_relation = get_or_create_relation(\n database=model.database,\n schema=model.schema,\n identifier=target_table,\n type='table') -%}\n\n {%- if not target_relation.is_table -%}\n {% do exceptions.relation_wrong_type(target_relation, 'table') %}\n {%- endif -%}\n\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set strategy_macro = strategy_dispatch(strategy_name) %}\n {% set strategy = strategy_macro(model, \"snapshotted_data\", \"source_data\", config, target_relation_exists) %}\n\n {% if not target_relation_exists %}\n\n {% set build_sql = build_snapshot_table(strategy, model['compiled_code']) %}\n {% set final_sql = create_table_as(False, target_relation, build_sql) %}\n\n {% else %}\n\n {{ adapter.valid_snapshot_target(target_relation) }}\n\n {% set staging_table = build_snapshot_staging_table(strategy, sql, target_relation) %}\n\n -- this may no-op if the database does not require column expansion\n {% do adapter.expand_target_column_types(from_relation=staging_table,\n to_relation=target_relation) %}\n\n {% set missing_columns = adapter.get_missing_columns(staging_table, target_relation)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\n | list %}\n\n {% do create_columns(target_relation, missing_columns) %}\n\n {% set source_columns = adapter.get_columns_in_relation(staging_table)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\n | list %}\n\n {% set quoted_source_columns = [] %}\n {% for column in source_columns %}\n {% do quoted_source_columns.append(adapter.quote(column.name)) %}\n {% endfor %}\n\n {% set final_sql = snapshot_merge_sql(\n target = target_relation,\n source = staging_table,\n insert_cols = quoted_source_columns\n )\n %}\n\n {% endif %}\n\n {% call statement('main') %}\n {{ final_sql }}\n {% endcall %}\n\n {% set should_revoke = should_revoke(target_relation_exists, full_refresh_mode=False) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if not target_relation_exists %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {% if staging_table is defined %}\n {% do post_snapshot(staging_table) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.get_or_create_relation", "macro.dbt.run_hooks", "macro.dbt.strategy_dispatch", "macro.dbt.build_snapshot_table", "macro.dbt.create_table_as", "macro.dbt.build_snapshot_staging_table", "macro.dbt.create_columns", "macro.dbt.snapshot_merge_sql", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes", "macro.dbt.post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574244.9588401, "supported_languages": ["sql"]}, "macro.dbt.materialization_test_default": {"name": "materialization_test_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/test.sql", "original_file_path": "macros/materializations/tests/test.sql", "unique_id": "macro.dbt.materialization_test_default", "macro_sql": "{%- materialization test, default -%}\n\n {% set relations = [] %}\n\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 {{ get_create_sql(target_relation, sql) }}\n {% endcall %}\n\n {% do relations.append(target_relation) %}\n\n {% set main_sql %}\n select *\n from {{ target_relation }}\n {% endset %}\n\n {{ adapter.commit() }}\n\n {% else %}\n\n {% set main_sql = sql %}\n\n {% endif %}\n\n {% set limit = config.get('limit') %}\n {% set fail_calc = config.get('fail_calc') %}\n {% set warn_if = config.get('warn_if') %}\n {% set error_if = config.get('error_if') %}\n\n {% call statement('main', fetch_result=True) -%}\n\n {{ get_test_sql(main_sql, fail_calc, warn_if, error_if, limit)}}\n\n {%- endcall %}\n\n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["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}, "patch_path": null, "arguments": [], "created_at": 1720574244.961419, "supported_languages": ["sql"]}, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9625301, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.962817, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.963016, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9635808, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.963941, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.964298, "supported_languages": null}, "macro.dbt.materialization_unit_default": {"name": "materialization_unit_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/unit.sql", "original_file_path": "macros/materializations/tests/unit.sql", "unique_id": "macro.dbt.materialization_unit_default", "macro_sql": "{%- materialization unit, default -%}\n\n {% set relations = [] %}\n\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 {%- for column in columns_in_relation -%}\n {%- do column_name_to_data_types.update({column.name|lower: column.data_type}) -%}\n {%- endfor -%}\n\n {% if not expected_sql %}\n {% set expected_sql = get_expected_sql(expected_rows, column_name_to_data_types) %}\n {% endif %}\n {% set unit_test_sql = get_unit_test_sql(sql, expected_sql, tested_expected_column_names) %}\n\n {% call statement('main', fetch_result=True) -%}\n\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}, "patch_path": null, "arguments": [], "created_at": 1720574244.96596, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.970777, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9711401, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9713778, "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 ~ \"`\") }}\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 ~ \"`\") }}\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}, "patch_path": null, "arguments": [], "created_at": 1720574244.972621, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.972841, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.973456, "supported_languages": null}, "macro.dbt.materialization_view_default": {"name": "materialization_view_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/view.sql", "original_file_path": "macros/materializations/models/view.sql", "unique_id": "macro.dbt.materialization_view_default", "macro_sql": "{%- materialization view, default -%}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='view') -%}\n {%- set intermediate_relation = make_intermediate_relation(target_relation) -%}\n\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) -%}\n /*\n This relation (probably) doesn't exist yet. If it does exist, it's a leftover from\n a previous run, and we're going to try to drop it immediately. At the end of this\n materialization, we're going to rename the \"existing_relation\" to this identifier,\n and then we're going to drop it. In order to make sure we run the correct one of:\n - drop view ...\n - drop table ...\n\n We need to set the type of this relation to be the type of the existing_relation, if it exists,\n or else \"view\" as a sane default if it does not. Note that if the existing_relation does not\n exist, then there is nothing to move out of the way and subsequentally drop. In that case,\n this relation will be effectively unused.\n */\n {%- set backup_relation_type = 'view' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_view_as_sql(intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n -- move the existing view out of the way\n {% if existing_relation is not none %}\n /* Do the equivalent of rename_if_exists. 'existing_relation' could have been dropped\n since the variable was first set. */\n {% set existing_relation = load_cached_relation(existing_relation) %}\n {% if existing_relation is not none %}\n {{ adapter.rename_relation(existing_relation, backup_relation) }}\n {% endif %}\n {% endif %}\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization -%}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.run_hooks", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574244.976175, "supported_languages": ["sql"]}, "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 -- 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 {% do create_indexes(target_relation) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n -- finally, drop the existing/backup relation after the commit\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.get_create_table_as_sql", "macro.dbt.create_indexes", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574244.978894, "supported_languages": ["sql"]}, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.980462, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9809668, "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\n {% set result = [] %}\n {% for sc in source_columns %}\n {% set tc = target_columns | selectattr(\"name\", \"equalto\", sc.name) | list | first %}\n {% if tc %}\n {% if sc.data_type != tc.data_type and not sc.can_expand_to(other_column=tc) %}\n {{ result.append( { 'column_name': tc.name, 'new_type': sc.data_type } ) }}\n {% endif %}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574244.981576, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.981801, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9824672, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.988773, "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 unique_key_match %}\n DBT_INTERNAL_SOURCE.{{ unique_key }} = DBT_INTERNAL_DEST.{{ unique_key }}\n {% endset %}\n {% do predicates.append(unique_key_match) %}\n {% endif %}\n {% else %}\n {% do predicates.append('FALSE') %}\n {% endif %}\n\n {{ sql_header if sql_header is not none }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on {{\"(\" ~ predicates | join(\") and (\") ~ \")\"}}\n\n {% if unique_key %}\n when matched then update set\n {% for column_name in update_columns -%}\n {{ column_name }} = DBT_INTERNAL_SOURCE.{{ column_name }}\n {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n {% endif %}\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv", "macro.dbt.get_merge_update_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574244.9903061, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9905531, "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 sequence and unique_key is not string %}\n delete from {{target }}\n using {{ source }}\n where (\n {% for key in unique_key %}\n {{ source }}.{{ key }} = {{ target }}.{{ key }}\n {{ \"and \" if not loop.last}}\n {% endfor %}\n {% if incremental_predicates %}\n {% for predicate in incremental_predicates %}\n and {{ predicate }}\n {% endfor %}\n {% endif %}\n );\n {% else %}\n delete from {{ target }}\n where (\n {{ unique_key }}) in (\n select ({{ unique_key }})\n from {{ source }}\n )\n {%- if incremental_predicates %}\n {% for predicate in incremental_predicates %}\n and {{ predicate }}\n {% endfor %}\n {%- endif -%};\n\n {% endif %}\n {% endif %}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574244.991488, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.991746, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9923499, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.992938, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9937909, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9940128, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.994192, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.9944682, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.994644, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.994921, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.995093, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.995344, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.995523, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.995664, "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}, "patch_path": null, "arguments": [], "created_at": 1720574244.995926, "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 {% if existing_relation is none %}\n {% set build_sql = get_create_table_as_sql(False, target_relation, sql) %}\n {% elif full_refresh_mode %}\n {% set build_sql = get_create_table_as_sql(False, intermediate_relation, sql) %}\n {% set need_swap = true %}\n {% else %}\n {% do run_query(get_create_table_as_sql(True, temp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=temp_relation,\n to_relation=target_relation) %}\n {#-- Process schema changes. Returns dict of changes if successful. Use source columns for upserting/merging --#}\n {% set dest_columns = process_schema_changes(on_schema_change, temp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n\n {#-- Get the incremental_strategy, the macro to use for the strategy, and build the sql --#}\n {% set incremental_strategy = config.get('incremental_strategy') or 'default' %}\n {% set incremental_predicates = config.get('predicates', none) or config.get('incremental_predicates', none) %}\n {% set strategy_sql_macro_func = adapter.get_incremental_strategy_macro(context, incremental_strategy) %}\n {% set strategy_arg_dict = ({'target_relation': target_relation, 'temp_relation': temp_relation, 'unique_key': unique_key, 'dest_columns': dest_columns, '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 need_swap %}\n {% do adapter.rename_relation(target_relation, backup_relation) %}\n {% do adapter.rename_relation(intermediate_relation, target_relation) %}\n {% do to_drop.append(backup_relation) %}\n {% endif %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {% do adapter.commit() %}\n\n {% for rel in to_drop %}\n {% do adapter.drop_relation(rel) %}\n {% endfor %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_temp_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.should_full_refresh", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.get_create_table_as_sql", "macro.dbt.run_query", "macro.dbt.process_schema_changes", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.000622, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.006145, "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\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}, "patch_path": null, "arguments": [], "created_at": 1720574245.007274, "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\n {%- set add_to_target_arr = schema_changes_dict['source_not_in_target'] -%}\n\n {%- if on_schema_change == 'append_new_columns'-%}\n {%- if add_to_target_arr | length > 0 -%}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, none) -%}\n {%- endif -%}\n\n {% elif on_schema_change == 'sync_all_columns' %}\n {%- set remove_from_target_arr = schema_changes_dict['target_not_in_source'] -%}\n {%- set new_target_types = schema_changes_dict['new_target_types'] -%}\n\n {% if add_to_target_arr | length > 0 or remove_from_target_arr | length > 0 %}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, remove_from_target_arr) -%}\n {% endif %}\n\n {% if new_target_types != [] %}\n {% for ntt in new_target_types %}\n {% set column_name = ntt['column_name'] %}\n {% set new_type = ntt['new_type'] %}\n {% do alter_column_type(target_relation, column_name, new_type) %}\n {% endfor %}\n {% endif %}\n\n {% endif %}\n\n {% set schema_change_message %}\n In {{ target_relation }}:\n Schema change approach: {{ on_schema_change }}\n Columns added: {{ add_to_target_arr }}\n Columns removed: {{ remove_from_target_arr }}\n Data types changed: {{ new_target_types }}\n {% endset %}\n\n {% do log(schema_change_message) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.alter_relation_add_remove_columns", "macro.dbt.alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.008381, "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\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}, "patch_path": null, "arguments": [], "created_at": 1720574245.009174, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.009405, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.009521, "supported_languages": null}, "macro.dbt.create_or_replace_clone": {"name": "create_or_replace_clone", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/create_or_replace_clone.sql", "original_file_path": "macros/materializations/models/clone/create_or_replace_clone.sql", "unique_id": "macro.dbt.create_or_replace_clone", "macro_sql": "{% macro create_or_replace_clone(this_relation, defer_relation) %}\n {{ return(adapter.dispatch('create_or_replace_clone', 'dbt')(this_relation, defer_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_or_replace_clone"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.0097978, "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 }} clone {{ defer_relation }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.0099258, "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\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 ~ \" 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 {% call statement('main') %}\n {% if target_relation and defer_relation and target_relation == defer_relation %}\n {{ log(\"Target relation and defer relation are the same, skipping clone for relation: \" ~ target_relation) }}\n {% else %}\n {{ create_or_replace_clone(target_relation, defer_relation) }}\n {% endif %}\n\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 {% 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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0133939, "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)) }}\n {% elif exists_as_table %}\n {% set create_table_sql = reset_csv_table(model, full_refresh_mode, old_relation, agate_table) %}\n {% else %}\n {% set create_table_sql = create_csv_table(model, agate_table) %}\n {% endif %}\n\n {% set code = 'CREATE' if full_refresh_mode else 'INSERT' %}\n {% set rows_affected = (agate_table.rows | length) %}\n {% set sql = load_csv_rows(model, agate_table) %}\n\n {% call noop_statement('main', code ~ ' ' ~ rows_affected, code, rows_affected) %}\n {{ get_csv_sql(create_table_sql, sql) }};\n {% endcall %}\n\n {% set target_relation = this.incorporate(type='table') %}\n\n {% set should_revoke = should_revoke(old_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if full_refresh_mode or not exists_as_table %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.run_hooks", "macro.dbt.reset_csv_table", "macro.dbt.create_csv_table", "macro.dbt.load_csv_rows", "macro.dbt.noop_statement", "macro.dbt.get_csv_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.0164192, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0214021, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.022233, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0224562, "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 %}\n {% endif %}\n\n {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.022896, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.023082, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0232089, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.023345, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.023455, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.023605, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0237172, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0241568, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.024332, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.025506, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.025913, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.026269, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.026768, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0270138, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0272791, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0276558, "supported_languages": null}, "macro.dbt.default__generate_database_name": {"name": "default__generate_database_name", "resource_type": "macro", "package_name": "dbt", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "unique_id": "macro.dbt.default__generate_database_name", "macro_sql": "{% macro default__generate_database_name(custom_database_name=none, node=none) -%}\n {%- set default_database = target.database -%}\n {%- if custom_database_name is none -%}\n\n {{ default_database }}\n\n {%- else -%}\n\n {{ custom_database_name }}\n\n {%- endif -%}\n\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.027893, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0285828, "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 }} 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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0289311, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0291069, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0292962, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.029479, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0302348, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.031411, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.031776, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0320141, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.032269, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.032469, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.032773, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.032966, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.033644, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.034049, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.034244, "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 }} rename to {{ target_name }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.034509, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0348392, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.035095, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0355468, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.035966, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0362802, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0364769, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.036715, "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 }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.0368168, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.037079, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.037281, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0375738, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.037705, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.037965, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.038103, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.038692, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.038869, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.039134, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.039275, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.039538, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.039673, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.040639, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.040755, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.041248, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.041402, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.041534, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.042783, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.043145, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.043469, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.043709, "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 }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.043811, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.044068, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.044205, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.04446, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.044598, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.045422, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.045598, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.046009, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.046654, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.047092, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.047266, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.047433, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0476658, "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 }} cascade\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.047766, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.048599, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.048738, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.04986, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.050046, "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 ~ \" 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}, "patch_path": null, "arguments": [], "created_at": 1720574245.050258, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.050518, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.050657, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.051052, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0512052, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.05138, "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 }}\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}, "patch_path": null, "arguments": [], "created_at": 1720574245.051774, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.052114, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.052392, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.052625, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.053165, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.054543, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0550861, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0553558, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0571468, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.058313, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.059007, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.059223, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0594409, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0595148, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.060242, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.060798, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.061017, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0613601, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.061675, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.061942, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.062253, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.062409, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.062638, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.062757, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.06356, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.063942, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.064123, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0646, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0648441, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.064948, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.065269, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.065502, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0657148, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.06579, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.066035, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.066168, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.066448, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.066577, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.067189, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0675719, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.067894, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.06805, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.068319, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.068453, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.068695, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.068846, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.069077, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.069227, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.069488, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.069608, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.069839, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.070132, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.070404, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.070532, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.070761, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.070859, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.071771, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.071915, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0720682, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0722141, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.072366, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0725079, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.072664, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.072832, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0729878, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.07313, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.073283, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.073421, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0735722, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.073712, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.073975, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.074168, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.074402, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.074502, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.074826, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.07508, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.075221, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.075732, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0758872, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.076101, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.076362, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0764859, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0768378, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.077064, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0773299, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.077457, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.077812, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.077986, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0781388, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.078312, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.078779, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0789871, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0791261, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.079227, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.079386, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0794601, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.079616, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.079775, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.080587, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.080719, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.08087, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.081242, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.081419, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.081548, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.081696, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.081818, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.083759, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.083915, "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 {{ 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}, "patch_path": null, "arguments": [], "created_at": 1720574245.084129, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.084399, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.084693, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.084996, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.08517, "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 }}\n {%- endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.085323, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.085558, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.086076, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.086292, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0864298, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.086827, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.087209, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.087477, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0876968, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0893571, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.089468, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.089623, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0897338, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0900512, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.090229, "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 }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.0903249, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.090535, "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 }} to {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.090776, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.090986, "supported_languages": null}, "macro.dbt.default__get_revoke_sql": {"name": "default__get_revoke_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "unique_id": "macro.dbt.default__get_revoke_sql", "macro_sql": "\n\n{%- macro default__get_revoke_sql(relation, privilege, grantees) -%}\n revoke {{ privilege }} on {{ relation }} from {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.09116, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0913768, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0920079, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0921888, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.09242, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.092635, "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 ~': 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}, "patch_path": null, "arguments": [], "created_at": 1720574245.093693, "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 -%}\n {{ sql_header }}\n {%- endif -%}\n {%- if limit is not none -%}\n {{ get_limit_subquery_sql(compiled_code, limit) }}\n {%- else -%}\n {{ compiled_code }}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_limit_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.094198, "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": "{% macro get_limit_subquery_sql(sql, limit) %}\n {{ adapter.dispatch('get_limit_subquery_sql', 'dbt')(sql, limit) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_limit_subquery_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.094378, "supported_languages": null}, "macro.dbt.default__get_limit_subquery_sql": {"name": "default__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.default__get_limit_subquery_sql", "macro_sql": "{% macro default__get_limit_subquery_sql(sql, limit) %}\n select *\n from (\n {{ sql }}\n ) as model_limit_subq\n limit {{ limit }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.094507, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0951538, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0953119, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.095503, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.095659, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.095912, "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 {% do run_query(alter_column_comment(relation, model.columns)) %}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.096419, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.099228, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.0994759, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.099665, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.099908, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1000829, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.100231, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.100401, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.100627, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.100818, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1010938, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.101269, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.101418, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1015732, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.101714, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.101904, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1020641, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.104251, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1044, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.104747, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.104954, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.105142, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.105312, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.106403, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.10673, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1069078, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.107233, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.107452, "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 }} add column {{ adapter.quote(tmp_column) }} {{ new_column_type }};\n update {{ relation }} set {{ adapter.quote(tmp_column) }} = {{ adapter.quote(column_name) }};\n alter table {{ relation }} drop column {{ adapter.quote(column_name) }} cascade;\n alter table {{ relation }} rename column {{ adapter.quote(tmp_column) }} to {{ adapter.quote(column_name) }}\n {% endcall %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.10801, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1082509, "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 }}\n\n {% for column in add_columns %}\n add column {{ column.name }} {{ column.data_type }}{{ ',' if not loop.last }}\n {% endfor %}{{ ',' if add_columns and remove_columns }}\n\n {% for column in remove_columns %}\n drop column {{ column.name }}{{ ',' if not loop.last }}\n {% endfor %}\n\n {%- endset -%}\n\n {% do run_query(sql) %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.108972, "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{%- for column in columns_in_relation -%}\n{#-- This needs to be a case-insensitive comparison --#}\n{%- do column_name_to_data_types.update({column.name|lower: column.data_type}) -%}\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\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 }}{% 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 }}{% 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.format_row"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.112022, "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) %}\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 }}{% 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}, "patch_path": null, "arguments": [], "created_at": 1720574245.112602, "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 {#-- 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 -%}", "depends_on": {"macros": ["macro.dbt.string_literal", "macro.dbt.escape_single_quotes", "macro.dbt.safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.113641, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.115299, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.115445, "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 {%- 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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1162062, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1165922, "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 -%}\nconfig_dict = {{ config_dict }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.1171358, "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\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}, "patch_path": null, "arguments": [], "created_at": 1720574245.117577, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1176472, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.118142, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.118376, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1186712, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1189508, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.119287, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.119735, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.120196, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.120806, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.121102, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1214, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.122457, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1234791, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1243231, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1253278, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1259751, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.126297, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.12699, "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 threshold = 'cast(' ~ dbt.dateadd(datepart, interval * -1, dbt.current_timestamp()) ~ ' as ' ~ ('date' if ignore_time_component else dbt.type_timestamp()) ~ ')' %}\n\n{% if group_by_columns|length() > 0 %}\n {% set select_gb_cols = group_by_columns|join(' ,') + ', ' %}\n {% set groupby_gb_cols = 'group by ' + group_by_columns|join(',') %}\n{% endif %}\n\n\nwith recency as (\n\n select \n\n {{ select_gb_cols }}\n {% if ignore_time_component %}\n cast(max({{ field }}) as date) as most_recent\n {%- else %}\n max({{ field }}) as most_recent\n {%- endif %}\n\n from {{ model }}\n\n {{ groupby_gb_cols }}\n\n)\n\nselect\n\n {{ select_gb_cols }}\n most_recent,\n {{ threshold }} as threshold\n\nfrom recency\nwhere most_recent < {{ threshold }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.current_timestamp", "macro.dbt.type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.127758, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.128184, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1286101, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.12919, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1296341, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.13016, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.130518, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.131157, "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 where {{ column_name }} is not null\n limit 1\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}, "patch_path": null, "arguments": [], "created_at": 1720574245.131885, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1324859, "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 {% set column_list = column_list.append( adapter.quote(column) ) %}\n {%- endfor %}\n{% else %}\n {{ exceptions.raise_compiler_error(\n \"`quote_columns` argument for unique_combination_of_columns test must be one of [True, False] Got: '\" ~ quote ~\"'.'\"\n ) }}\n{% endif %}\n\n{%- set columns_csv=column_list | join(', ') %}\n\n\nwith validation_errors as (\n\n select\n {{ columns_csv }}\n from {{ model }}\n group by {{ columns_csv }}\n having count(*) > 1\n\n)\n\nselect *\nfrom validation_errors\n\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.13314, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1336792, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.134, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.134376, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1347141, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.135335, "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 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": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.1360939, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.136972, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1378188, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.139698, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.143394, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.143903, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.144185, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1477141, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.149129, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.149388, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1495419, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.149952, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.150212, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1503942, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.150632, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.150794, "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{#- 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}, "patch_path": null, "arguments": [], "created_at": 1720574245.151362, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.152141, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1528242, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.153374, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.153595, "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 1) - 1\",\n start_date\n )\n }}\n ) as date_{{datepart}}\n from rawdata\n\n),\n\nfiltered as (\n\n select *\n from all_periods\n where date_{{datepart}} <= {{ end_date }}\n\n)\n\nselect * from filtered\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.generate_series", "macro.dbt_utils.get_intervals_between", "macro.dbt.dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.1539369, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.154302, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.154874, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.155175, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.155499, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1561542, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.156943, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.157757, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.158135, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1583161, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.158792, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1594508, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.160238, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.160623, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.160888, "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) -%}\r\n {{ return(adapter.dispatch('star', 'dbt_utils')(from, relation_alias, except, prefix, suffix, quote_identifiers)) }}\r\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__star"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.162113, "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) -%}\r\n {%- do dbt_utils._is_relation(from, 'star') -%}\r\n {%- do dbt_utils._is_ephemeral(from, 'star') -%}\r\n\r\n {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}\r\n {%- if not execute -%}\r\n {% do return('*') %}\r\n {%- endif -%}\r\n\r\n {% set cols = dbt_utils.get_filtered_columns_in_relation(from, except) %}\r\n\r\n {%- if cols|length <= 0 -%}\r\n {% if flags.WHICH == 'compile' %}\r\n {% set response %}\r\n*\r\n/* No columns were returned. Maybe the relation doesn't exist yet \r\nor all columns were excluded. This star is only output during \r\ndbt compile, and exists to keep SQLFluff happy. */\r\n {% endset %}\r\n {% do return(response) %}\r\n {% else %}\r\n {% do return(\"/* no columns returned from star() macro */\") %}\r\n {% endif %}\r\n {%- else -%}\r\n {%- for col in cols %}\r\n {%- if relation_alias %}{{ relation_alias }}.{% else %}{%- endif -%}\r\n {%- if quote_identifiers -%}\r\n {{ adapter.quote(col)|trim }} {%- if prefix!='' or suffix!='' %} as {{ adapter.quote(prefix ~ col ~ suffix)|trim }} {%- endif -%}\r\n {%- else -%}\r\n {{ col|trim }} {%- if prefix!='' or suffix!='' %} as {{ (prefix ~ col ~ suffix)|trim }} {%- endif -%}\r\n {% endif %}\r\n {%- if not loop.last %},{{ '\\n ' }}{%- endif -%}\r\n {%- endfor -%}\r\n {% endif %}\r\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt_utils.get_filtered_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.163611, "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') -%}\n {{ return(adapter.dispatch('unpivot', 'dbt_utils')(relation, cast_to, exclude, remove, field_name, value_name)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_utils.default__unpivot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.164927, "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') -%}\n\n {% if not relation %}\n {{ exceptions.raise_compiler_error(\"Error: argument `relation` is required for `unpivot` macro.\") }}\n {% endif %}\n\n {%- set exclude = exclude if exclude is not none else [] %}\n {%- set remove = remove if remove is not none else [] %}\n\n {%- set include_cols = [] %}\n\n {%- set table_columns = {} %}\n\n {%- do table_columns.update({relation: []}) %}\n\n {%- do dbt_utils._is_relation(relation, 'unpivot') -%}\n {%- do dbt_utils._is_ephemeral(relation, 'unpivot') -%}\n {%- set cols = adapter.get_columns_in_relation(relation) %}\n\n {%- for col in cols -%}\n {%- if col.column.lower() not in remove|map('lower') and col.column.lower() not in exclude|map('lower') -%}\n {% do include_cols.append(col) %}\n {%- endif %}\n {%- endfor %}\n\n\n {%- for col in include_cols -%}\n select\n {%- for exclude_col in exclude %}\n {{ exclude_col }},\n {%- endfor %}\n\n cast('{{ col.column }}' as {{ dbt.type_string() }}) as {{ field_name }},\n cast( {% if col.data_type == 'boolean' %}\n {{ dbt.cast_bool_to_text(col.column) }}\n {% else %}\n {{ col.column }}\n {% endif %}\n as {{ cast_to }}) as {{ value_name }}\n\n from {{ relation }}\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n {%- endfor -%}\n\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.type_string", "macro.dbt.cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.166398, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1666749, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.166802, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1699672, "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) }} as {{ dbt.type_string() }}) as {{ source_column_name }},\n {%- endif %}\n\n {% for col_name in ordered_column_names -%}\n\n {%- set col = column_superset[col_name] %}\n {%- set col_type = column_override.get(col.column, col.data_type) %}\n {%- set col_name = adapter.quote(col_name) if col_name in relation_columns[relation] else 'null' %}\n cast({{ col_name }} as {{ col_type }}) as {{ col.quoted }} {% if not loop.last %},{% endif -%}\n\n {%- endfor %}\n\n from {{ relation }}\n\n {% if where -%}\n where {{ where }}\n {%- endif %}\n )\n\n {% if not loop.last -%}\n union all\n {% endif -%}\n\n {%- endfor -%}\n\n{%- endmacro -%}", "depends_on": {"macros": ["macro.dbt_utils._is_relation", "macro.dbt_utils._is_ephemeral", "macro.dbt.string_literal", "macro.dbt.type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.173165, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.173451, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.173684, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.17456, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1747682, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.174926, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1751091, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.175267, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.175426, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1755881, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.175956, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.176176, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.176536, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1770382, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.177361, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.17767, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1808882, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.181231, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.181925, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1825962, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1830668, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.184165, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1855638, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.186593, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.187372, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.187818, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1884952, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1892512, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.189684, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.189864, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.190232, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.190782, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.191221, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1918101, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1923342, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1924758, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.192607, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1927412, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.193231, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.193983, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.195126, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.1953988, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.195928, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.196678, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2019498, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.20261, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.203445, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.20413, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.204809, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.20572, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2059011, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.20601, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.20879, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.216235, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.216374, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2164512, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.217006, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2185369, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.218863, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.219121, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.219379, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.21969, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2198799, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.220074, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.220442, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2213728, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2215302, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.221688, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2218418, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.221984, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2221382, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.222944, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2235498, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.224878, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.225116, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2253509, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.225575, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.225801, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.226054, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2263, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.226527, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.226835, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.226934, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.22703, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.227125, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.227468, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.228138, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.229132, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.229675, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.230418, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2308831, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.231013, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.231138, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.231261, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.231394, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2343512, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.234508, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.234661, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.234812, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2364428, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2373812, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.237518, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.237775, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.238047, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2381718, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2382898, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.238409, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.238529, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.239, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2395341, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2400131, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.240206, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.240418, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2406578, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.241741, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.245527, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.245872, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.246224, "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\n{%- for column in staging_columns %}\n {% if column.name|lower in source_column_names -%}\n {{ fivetran_utils.quote_column(column) }} as \n {%- if 'alias' in column %} {{ column.alias }} {% else %} {{ fivetran_utils.quote_column(column) }} {%- endif -%}\n {%- else -%}\n cast(null as {{ column.datatype }})\n {%- if 'alias' in column %} as {{ column.alias }} {% else %} as {{ fivetran_utils.quote_column(column) }} {% endif -%}\n {%- endif -%}\n {%- if not loop.last -%} , {% endif -%}\n{% endfor %}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.fivetran_utils.quote_column"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.2477398, "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 %}\n {{ column.name }}\n {% endif %}\n {% else %}\n {{ column.name }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.248258, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.248815, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.248964, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.249113, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2492769, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.24942, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.249563, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2503738, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.251554, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.252246, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2524061, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.252557, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2527092, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2528598, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.253029, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.253269, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2533681, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.253462, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.254053, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2554188, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.255587, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2563741, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2598898, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.264332, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.265661, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.265991, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2661362, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.266325, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.266648, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.266755, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.266863, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.266967, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.267068, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2673159, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.267416, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2675111, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.2678862, "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}, "patch_path": null, "arguments": [], "created_at": 1720574245.268251, "supported_languages": null}, "macro.salesforce_source.get_contact_columns": {"name": "get_contact_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_contact_columns.sql", "original_file_path": "macros/get_contact_columns.sql", "unique_id": "macro.salesforce_source.get_contact_columns", "macro_sql": "{% macro get_contact_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"department\", \"datatype\": dbt.type_string()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"email\", \"datatype\": dbt.type_string()},\n {\"name\": \"first_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"home_phone\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"individual_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"last_activity_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_modified_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_modified_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_referenced_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_viewed_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"lead_source\", \"datatype\": dbt.type_string()},\n {\"name\": \"mailing_city\", \"datatype\": dbt.type_string()},\n {\"name\": \"mailing_country\", \"datatype\": dbt.type_string()},\n {\"name\": \"mailing_country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"mailing_postal_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"mailing_state\", \"datatype\": dbt.type_string()},\n {\"name\": \"mailing_state_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"mailing_street\", \"datatype\": dbt.type_string()},\n {\"name\": \"master_record_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"mobile_phone\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"owner_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"phone\", \"datatype\": dbt.type_string()},\n {\"name\": \"reports_to_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"title\", \"datatype\": dbt.type_string()},\n] %}\n\n{{ salesforce_source.add_renamed_columns(columns) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__contact_pass_through_columns')) }} \n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_string", "macro.salesforce_source.add_renamed_columns", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.271793, "supported_languages": null}, "macro.salesforce_source.get_account_columns": {"name": "get_account_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_account_columns.sql", "original_file_path": "macros/get_account_columns.sql", "unique_id": "macro.salesforce_source.get_account_columns", "macro_sql": "{% macro get_account_columns() %}\n\n{% set columns = [\n\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"account_number\", \"datatype\": dbt.type_string()},\n {\"name\": \"account_source\", \"datatype\": dbt.type_string()},\n {\"name\": \"annual_revenue\", \"datatype\": dbt.type_float()},\n {\"name\": \"billing_city\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_country\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_postal_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_state\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_state_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_street\", \"datatype\": dbt.type_string()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"industry\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_deleted\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"last_activity_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_referenced_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_viewed_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"master_record_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"number_of_employees\", \"datatype\": dbt.type_int()},\n {\"name\": \"owner_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"ownership\", \"datatype\": dbt.type_string()},\n {\"name\": \"parent_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"rating\", \"datatype\": dbt.type_string()},\n {\"name\": \"record_type_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_city\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_country\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_postal_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_state\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_state_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_street\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"website\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ salesforce_source.add_renamed_columns(columns) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__account_pass_through_columns')) }}\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_float", "macro.dbt.type_int", "macro.salesforce_source.add_renamed_columns", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.275667, "supported_languages": null}, "macro.salesforce_source.coalesce_rename": {"name": "coalesce_rename", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/coalesce_rename.sql", "original_file_path": "macros/coalesce_rename.sql", "unique_id": "macro.salesforce_source.coalesce_rename", "macro_sql": "{% macro coalesce_rename(\n column_key,\n column_dict,\n original_column_name=column_dict[column_key][\"name\"],\n datatype=column_dict[column_key][\"datatype\"],\n alias=column_dict[column_key][\"alias\"] | default(original_column_name),\n renamed_column_name=column_dict[column_key][\"renamed_column_name\"]\n ) %}\n\n{# This macro accomodates Fivetran connectors that keep the original salesforce field naming conventions without underscores #}\n{%- if original_column_name|lower == renamed_column_name|lower %}\n cast({{ renamed_column_name }} as {{ datatype }}) as {{ alias }}\n\n{%- else %}\n coalesce(cast({{ renamed_column_name }} as {{ datatype }}),\n cast({{ original_column_name }} as {{ datatype }}))\n as {{ alias }}\n\n{%- endif %}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.276406, "supported_languages": null}, "macro.salesforce_source.get_task_columns": {"name": "get_task_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_task_columns.sql", "original_file_path": "macros/get_task_columns.sql", "unique_id": "macro.salesforce_source.get_task_columns", "macro_sql": "{% macro get_task_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"activity_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"call_disposition\", \"datatype\": dbt.type_string()},\n {\"name\": \"call_duration_in_seconds\", \"datatype\": dbt.type_int()},\n {\"name\": \"call_object\", \"datatype\": dbt.type_string()},\n {\"name\": \"call_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"completed_date_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_archived\", \"datatype\": \"boolean\"},\n {\"name\": \"is_closed\", \"datatype\": \"boolean\"},\n {\"name\": \"is_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"is_high_priority\", \"datatype\": \"boolean\"},\n {\"name\": \"last_modified_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_modified_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"owner_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"priority\", \"datatype\": dbt.type_string()},\n {\"name\": \"record_type_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"subject\", \"datatype\": dbt.type_string()},\n {\"name\": \"task_subtype\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"what_count\", \"datatype\": dbt.type_int()},\n {\"name\": \"what_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"who_count\", \"datatype\": dbt.type_int()},\n {\"name\": \"who_id\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ salesforce_source.add_renamed_columns(columns) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__task_pass_through_columns')) }}\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", "macro.salesforce_source.add_renamed_columns", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.279614, "supported_languages": null}, "macro.salesforce_source.get_user_role_columns": {"name": "get_user_role_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_user_role_columns.sql", "original_file_path": "macros/get_user_role_columns.sql", "unique_id": "macro.salesforce_source.get_user_role_columns", "macro_sql": "{% macro get_user_role_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_active\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"developer_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"opportunity_access_for_account_owner\", \"datatype\": dbt.type_string()},\n {\"name\": \"parent_role_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"rollup_description\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ salesforce_source.add_renamed_columns(columns) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__user_role_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_boolean", "macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.salesforce_source.add_renamed_columns", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.280767, "supported_languages": null}, "macro.salesforce_source.get_order_columns": {"name": "get_order_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_order_columns.sql", "original_file_path": "macros/get_order_columns.sql", "unique_id": "macro.salesforce_source.get_order_columns", "macro_sql": "{% macro get_order_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"activated_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"activated_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"billing_city\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_country\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_postal_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_state\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_state_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"billing_street\", \"datatype\": dbt.type_string()},\n {\"name\": \"contract_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"end_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"last_modified_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_modified_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_referenced_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_viewed_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"opportunity_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"order_number\", \"datatype\": dbt.type_string()},\n {\"name\": \"original_order_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"owner_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"pricebook_2_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_city\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_country\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_postal_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_state\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_state_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"shipping_street\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"total_amount\", \"datatype\": dbt.type_float()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n] %}\n\n{{ salesforce_source.add_renamed_columns(columns) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__order_pass_through_columns')) }}\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_float", "macro.salesforce_source.add_renamed_columns", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.284958, "supported_languages": null}, "macro.salesforce_source.get_user_columns": {"name": "get_user_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_user_columns.sql", "original_file_path": "macros/get_user_columns.sql", "unique_id": "macro.salesforce_source.get_user_columns", "macro_sql": "{% macro get_user_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"_fivetran_active\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"alias\", \"datatype\": dbt.type_string()},\n {\"name\": \"city\", \"datatype\": dbt.type_string()},\n {\"name\": \"company_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"contact_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"country\", \"datatype\": dbt.type_string()},\n {\"name\": \"country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"department\", \"datatype\": dbt.type_string()},\n {\"name\": \"email\", \"datatype\": dbt.type_string()},\n {\"name\": \"first_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"individual_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_active\", \"datatype\": \"boolean\"},\n {\"name\": \"last_login_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_referenced_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_viewed_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"manager_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"postal_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"profile_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"state\", \"datatype\": dbt.type_string()},\n {\"name\": \"state_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"street\", \"datatype\": dbt.type_string()},\n {\"name\": \"title\", \"datatype\": dbt.type_string()},\n {\"name\": \"user_role_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"user_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"username\", \"datatype\": dbt.type_string()},\n] %}\n\n{{ salesforce_source.add_renamed_columns(columns) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__user_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_boolean", "macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.salesforce_source.add_renamed_columns", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.288296, "supported_languages": null}, "macro.salesforce_source.get_product_2_columns": {"name": "get_product_2_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_product_2_columns.sql", "original_file_path": "macros/get_product_2_columns.sql", "unique_id": "macro.salesforce_source.get_product_2_columns", "macro_sql": "{% macro get_product_2_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"created_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"display_url\", \"datatype\": dbt.type_string()},\n {\"name\": \"external_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"family\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_active\", \"datatype\": \"boolean\"},\n {\"name\": \"is_archived\", \"datatype\": \"boolean\"},\n {\"name\": \"is_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"last_modified_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_modified_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_referenced_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_viewed_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"number_of_quantity_installments\", \"datatype\": dbt.type_int()},\n {\"name\": \"number_of_revenue_installments\", \"datatype\": dbt.type_int()},\n {\"name\": \"product_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"quantity_installment_period\", \"datatype\": dbt.type_string()},\n {\"name\": \"quantity_schedule_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"quantity_unit_of_measure\", \"datatype\": dbt.type_string()},\n {\"name\": \"record_type_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"revenue_installment_period\", \"datatype\": dbt.type_string()},\n {\"name\": \"revenue_schedule_type\", \"datatype\": dbt.type_string()},\n] %}\n\n{{ salesforce_source.add_renamed_columns(columns) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__product_2_pass_through_columns')) }}\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", "macro.salesforce_source.add_renamed_columns", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.291129, "supported_languages": null}, "macro.salesforce_source.column_list_to_dict": {"name": "column_list_to_dict", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/column_list_to_dict.sql", "original_file_path": "macros/column_list_to_dict.sql", "unique_id": "macro.salesforce_source.column_list_to_dict", "macro_sql": "{% macro column_list_to_dict(column_list) %}\n\n {%- set column_dict = {} -%}\n {%- for col in column_list -%}\n {%- do column_dict.update({col.name: col}) if not col.is_rename -%}\n {%- endfor -%}\n {{ return(column_dict) }}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.2915132, "supported_languages": null}, "macro.salesforce_source.get_opportunity_columns": {"name": "get_opportunity_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_opportunity_columns.sql", "original_file_path": "macros/get_opportunity_columns.sql", "unique_id": "macro.salesforce_source.get_opportunity_columns", "macro_sql": "{% macro get_opportunity_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": \"boolean\"},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"amount\", \"datatype\": dbt.type_float()},\n {\"name\": \"campaign_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"close_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"expected_revenue\", \"datatype\": dbt.type_numeric()},\n {\"name\": \"fiscal\", \"datatype\": dbt.type_string()},\n {\"name\": \"fiscal_quarter\", \"datatype\": dbt.type_int()},\n {\"name\": \"fiscal_year\", \"datatype\": dbt.type_int()},\n {\"name\": \"forecast_category\", \"datatype\": dbt.type_string()},\n {\"name\": \"forecast_category_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"has_open_activity\", \"datatype\": \"boolean\"},\n {\"name\": \"has_opportunity_line_item\", \"datatype\": \"boolean\"},\n {\"name\": \"has_overdue_task\", \"datatype\": \"boolean\"},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_closed\", \"datatype\": \"boolean\"},\n {\"name\": \"is_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"is_won\", \"datatype\": \"boolean\"},\n {\"name\": \"last_activity_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_referenced_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_viewed_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"lead_source\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"next_step\", \"datatype\": dbt.type_string()},\n {\"name\": \"owner_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"probability\", \"datatype\": dbt.type_float()},\n {\"name\": \"record_type_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"stage_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"synced_quote_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ salesforce_source.add_renamed_columns(columns) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__opportunity_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_string", "macro.dbt.type_float", "macro.dbt.type_numeric", "macro.dbt.type_int", "macro.salesforce_source.add_renamed_columns", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.29506, "supported_languages": null}, "macro.salesforce_source.get_event_columns": {"name": "get_event_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_event_columns.sql", "original_file_path": "macros/get_event_columns.sql", "unique_id": "macro.salesforce_source.get_event_columns", "macro_sql": "{% macro get_event_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"activity_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"activity_date_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"created_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"end_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"end_date_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"event_subtype\", \"datatype\": dbt.type_string()},\n {\"name\": \"group_event_type\", \"datatype\": dbt.type_string()},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_archived\", \"datatype\": \"boolean\"},\n {\"name\": \"is_child\", \"datatype\": \"boolean\"},\n {\"name\": \"is_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"is_group_event\", \"datatype\": \"boolean\"},\n {\"name\": \"is_recurrence\", \"datatype\": \"boolean\"},\n {\"name\": \"last_modified_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_modified_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"location\", \"datatype\": dbt.type_string()},\n {\"name\": \"owner_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"start_date_time\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"subject\", \"datatype\": dbt.type_string()},\n {\"name\": \"type\", \"datatype\": dbt.type_string()},\n {\"name\": \"what_count\", \"datatype\": dbt.type_int()},\n {\"name\": \"what_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"who_count\", \"datatype\": dbt.type_int()},\n {\"name\": \"who_id\", \"datatype\": dbt.type_string()}\n] %}\n\n{{ salesforce_source.add_renamed_columns(columns) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__event_pass_through_columns')) }}\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", "macro.salesforce_source.add_renamed_columns", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.298147, "supported_languages": null}, "macro.salesforce_source.get_lead_columns": {"name": "get_lead_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_lead_columns.sql", "original_file_path": "macros/get_lead_columns.sql", "unique_id": "macro.salesforce_source.get_lead_columns", "macro_sql": "{% macro get_lead_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"annual_revenue\", \"datatype\": dbt.type_float()},\n {\"name\": \"city\", \"datatype\": dbt.type_string()},\n {\"name\": \"company\", \"datatype\": dbt.type_string()},\n {\"name\": \"converted_account_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"converted_contact_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"converted_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"converted_opportunity_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"country\", \"datatype\": dbt.type_string()},\n {\"name\": \"country_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"email\", \"datatype\": dbt.type_string()},\n {\"name\": \"email_bounced_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"email_bounced_reason\", \"datatype\": dbt.type_string()},\n {\"name\": \"first_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"has_opted_out_of_email\", \"datatype\": \"boolean\"},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"individual_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"industry\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_converted\", \"datatype\": \"boolean\"},\n {\"name\": \"is_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"is_unread_by_owner\", \"datatype\": \"boolean\"},\n {\"name\": \"last_activity_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_modified_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_modified_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_name\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_referenced_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_viewed_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"lead_source\", \"datatype\": dbt.type_string()},\n {\"name\": \"master_record_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"mobile_phone\", \"datatype\": dbt.type_string()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"number_of_employees\", \"datatype\": dbt.type_int()},\n {\"name\": \"owner_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"phone\", \"datatype\": dbt.type_string()},\n {\"name\": \"postal_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"state\", \"datatype\": dbt.type_string()},\n {\"name\": \"state_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"status\", \"datatype\": dbt.type_string()},\n {\"name\": \"street\", \"datatype\": dbt.type_string()},\n {\"name\": \"title\", \"datatype\": dbt.type_string()},\n {\"name\": \"website\", \"datatype\": dbt.type_string()},\n] %}\n\n{{ salesforce_source.add_renamed_columns(columns) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__lead_pass_through_columns')) }}\n\n{{ return(columns) }}\n\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.type_timestamp", "macro.dbt.type_boolean", "macro.dbt.type_float", "macro.dbt.type_string", "macro.dbt.type_int", "macro.salesforce_source.add_renamed_columns", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.3030899, "supported_languages": null}, "macro.salesforce_source.get_opportunity_line_item_columns": {"name": "get_opportunity_line_item_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/get_opportunity_line_item_columns.sql", "original_file_path": "macros/get_opportunity_line_item_columns.sql", "unique_id": "macro.salesforce_source.get_opportunity_line_item_columns", "macro_sql": "{% macro get_opportunity_line_item_columns() %}\n\n{% set columns = [\n {\"name\": \"_fivetran_synced\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"_fivetran_active\", \"datatype\": dbt.type_boolean()},\n {\"name\": \"created_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"created_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"description\", \"datatype\": dbt.type_string()},\n {\"name\": \"discount\", \"datatype\": dbt.type_float()},\n {\"name\": \"has_quantity_schedule\", \"datatype\": \"boolean\"},\n {\"name\": \"has_revenue_schedule\", \"datatype\": \"boolean\"},\n {\"name\": \"has_schedule\", \"datatype\": \"boolean\"},\n {\"name\": \"id\", \"datatype\": dbt.type_string()},\n {\"name\": \"is_deleted\", \"datatype\": \"boolean\"},\n {\"name\": \"last_modified_by_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"last_modified_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_referenced_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"last_viewed_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"list_price\", \"datatype\": dbt.type_float()},\n {\"name\": \"name\", \"datatype\": dbt.type_string()},\n {\"name\": \"opportunity_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"pricebook_entry_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"product_2_id\", \"datatype\": dbt.type_string()},\n {\"name\": \"product_code\", \"datatype\": dbt.type_string()},\n {\"name\": \"quantity\", \"datatype\": dbt.type_float()},\n {\"name\": \"service_date\", \"datatype\": dbt.type_timestamp()},\n {\"name\": \"sort_order\", \"datatype\": dbt.type_int()},\n {\"name\": \"total_price\", \"datatype\": dbt.type_float()},\n {\"name\": \"unit_price\", \"datatype\": dbt.type_float()}\n] %}\n\n{{ salesforce_source.add_renamed_columns(columns) }}\n\n{{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__opportunity_line_item_pass_through_columns')) }}\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_float", "macro.dbt.type_int", "macro.salesforce_source.add_renamed_columns", "macro.fivetran_utils.add_pass_through_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.3058932, "supported_languages": null}, "macro.salesforce_source.add_renamed_columns": {"name": "add_renamed_columns", "resource_type": "macro", "package_name": "salesforce_source", "path": "macros/add_renamed_columns.sql", "original_file_path": "macros/add_renamed_columns.sql", "unique_id": "macro.salesforce_source.add_renamed_columns", "macro_sql": "{% macro add_renamed_columns(column_list) %}\n\n{%- set renamed_columns = [] %}\n\n{%- for col in column_list %}\n {# Use the alias if it is provided. #}\n {%- set original_column_name = col.name %}\n\n {%- if 'fivetran' not in original_column_name %}\n {# Use renamed_column_name value if it provided in the get_columns macro #}\n {%- set renamed_column_name = col.renamed_column_name | default(original_column_name.split('_') | map('capitalize') | join('')) %}\n\n {# Add an entry to the list of renames to populate the filled columns if the rename is different #}\n {%- do renamed_columns.append({\"name\": renamed_column_name, \"datatype\": col.datatype, \"is_rename\": true}) if renamed_column_name|lower != original_column_name|lower %}\n\n {# Update the original column with the renamed column name for use later. #}\n {%- set col = col.update({ \"renamed_column_name\": renamed_column_name, \"is_rename\": false}) %}\n {%- endif %}\n{%- endfor %}\n\n{%- do column_list.extend(renamed_columns) %}\n\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1720574245.3068302, "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"}}, "exposures": {}, "metrics": {}, "groups": {}, "selectors": {}, "disabled": {"test.salesforce_source_integration_tests.consistency_all_tables_and_columns": [{"database": "postgres", "schema": "zz_dbt_catherine_sf_dbt_test__audit", "name": "consistency_all_tables_and_columns", "resource_type": "test", "package_name": "salesforce_source_integration_tests", "path": "consistency/consistency_all_tables_and_columns.sql", "original_file_path": "tests/consistency/consistency_all_tables_and_columns.sql", "unique_id": "test.salesforce_source_integration_tests.consistency_all_tables_and_columns", "fqn": ["salesforce_source_integration_tests", "consistency", "consistency_all_tables_and_columns"], "alias": "consistency_all_tables_and_columns", "checksum": {"name": "sha256", "checksum": "88c8d3468e561f22d8057587b38c92d00095130dce9529b3555772d7a787eedc"}, "config": {"enabled": false, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": ["fivetran_validations"], "meta": {}, "group": null, "materialized": "test", "severity": "ERROR", "store_failures": null, "store_failures_as": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "tags": ["fivetran_validations"], "description": "", "columns": {}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": null, "build_path": null, "unrendered_config": {"tags": ["fivetran_validations"], "enabled": false}, "created_at": 1720574245.643755, "relation_name": null, "raw_code": "{{ config(\n tags=\"fivetran_validations\",\n enabled=var('fivetran_validation_tests_enabled', false)\n) }}\n\n/* This test is to make sure the final columns produced are the same between versions.\nOnly one test is needed since it will fetch all tables and all columns in each schema.\n!!! THIS TEST IS WRITTEN FOR BIGQUERY!!! */\n{% if target.type == 'bigquery' %}\nwith prod as (\n select\n table_name,\n column_name,\n /* Need the case since the prod version is uncasted, and bigquery automatically produces a value of \"bignumeric\" or \"float\"\n while the dev is casted as dbt.type_numeric() and produces a value of \"numeric\" */\n case when lower(data_type) like '%numeric%' or lower(data_type) like '%float%' then 'numeric'\n else data_type \n end as data_type\n from {{ target.schema }}_salesforce_source_prod.INFORMATION_SCHEMA.COLUMNS\n where table_name like 'stg_%'\n),\n\ndev as (\n select\n table_name,\n column_name,\n case when lower(data_type) like '%numeric%' or lower(data_type) like '%float%' then 'numeric'\n else data_type \n end as data_type\n from {{ target.schema }}_salesforce_source_dev.INFORMATION_SCHEMA.COLUMNS\n where table_name like 'stg_%'\n),\n\nfinal as (\n -- test will fail if any rows from prod are not found in dev\n (select * from prod\n except distinct\n select * from dev)\n\n union all -- union since we only care if rows are produced\n\n -- test will fail if any rows from dev are not found in prod\n (select * from dev\n except distinct\n select * from prod)\n)\n\nselect *\nfrom final\n\n{% else %}\n{{ print('This is written to run on bigquery. If you need to run on another warehouse, add a version!') }}\n\n{% endif %}", "language": "sql", "refs": [], "sources": [], "metrics": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}}], "model.salesforce_source.stg_salesforce__opportunity_history": [{"database": "postgres", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__opportunity_history", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce_history/stg_salesforce__opportunity_history.sql", "original_file_path": "models/salesforce_history/stg_salesforce__opportunity_history.sql", "unique_id": "model.salesforce_source.stg_salesforce__opportunity_history", "fqn": ["salesforce_source", "salesforce_history", "stg_salesforce__opportunity_history"], "alias": "stg_salesforce__opportunity_history", "checksum": {"name": "sha256", "checksum": "cedc11f02f20dbf84230c35bffecadd658b05c6e7bec647507865b762661e6d7"}, "config": {"enabled": false, "alias": null, "schema": "salesforce_source_dev", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "history_unique_key", "on_schema_change": "fail", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected", "partition_by": {"field": "_fivetran_date", "data_type": "date"}, "file_format": "parquet"}, "tags": [], "description": "Represents historical records of opportunities, which are sales or pending deals.", "columns": {"opportunity_id": {"name": "opportunity_id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "true if it is the currently active record. false if it is a historical version of the record. Only one version of the record can be true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_start": {"name": "_fivetran_start", "description": "The time when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The time until which the record was active minus epsilon, where epsilon is the smallest time difference that can be stored in the timestamp type value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_date": {"name": "_fivetran_date", "description": "The date when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "history_unique_key": {"name": "history_unique_key", "description": "Surrogate key hashed on `_fivetran_start` and `opportunity_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "ID of the account associated with this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "amount": {"name": "amount", "description": "Estimated total sale amount. For opportunities with products, the amount is the sum of the related products.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "ID of a related Campaign. This field is defined only for those organizations that have the campaign feature Campaigns enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "close_date": {"name": "close_date", "description": "Required. Date when the opportunity is expected to close.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Date when the opportunity is was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_description": {"name": "opportunity_description", "description": "Text description of the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "expected_revenue": {"name": "expected_revenue", "description": "Read-only field that is equal to the product of the opportunity Amount field and the Probability.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal": {"name": "fiscal", "description": "If fiscal years are not enabled, the name of the fiscal quarter or period in which the opportunity CloseDate falls.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal_quarter": {"name": "fiscal_quarter", "description": "Represents the fiscal quarter. Valid values are 1, 2, 3, or 4.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal_year": {"name": "fiscal_year", "description": "Represents the fiscal year, for example, 2006.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_category": {"name": "forecast_category", "description": "Restricted picklist field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_category_name": {"name": "forecast_category_name", "description": "The name of the forecast category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_open_activity": {"name": "has_open_activity", "description": "Indicates whether an opportunity has an open event or task (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_opportunity_line_item": {"name": "has_opportunity_line_item", "description": "Read-only field that indicates whether the opportunity has associated line items. A value of true means that Opportunity line items have been created for the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_overdue_task": {"name": "has_overdue_task", "description": "Indicates whether an opportunity has an overdue task (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_closed": {"name": "is_closed", "description": "True, if Stage Name Label is Closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_won": {"name": "is_won", "description": "True, if Stage Name Label is Won.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is one of the following, whichever is the most recent:Due date of the most recent event logged against the record or Due date of the most recently closed task associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_source": {"name": "lead_source", "description": "Source of this opportunity, such as Advertisement or Trade Show.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "opportunity_name": {"name": "opportunity_name", "description": "Required. A name for this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "next_step": {"name": "next_step", "description": "Description of next task in closing opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "ID of the User who has been assigned to work this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "probability": {"name": "probability", "description": "Percentage of estimated confidence in closing the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "stage_name": {"name": "stage_name", "description": "Required. Current stage of this record. The StageName field controls several other fields on an opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "synced_quote_id": {"name": "synced_quote_id", "description": "The ID of the Quote that syncs with the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of opportunity. For example, Existing Business or New Business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce_history/stg_salesforce_history.yml", "build_path": null, "unrendered_config": {"materialized": "incremental", "enabled": false, "unique_key": "history_unique_key", "incremental_strategy": "delete+insert", "partition_by": {"field": "_fivetran_date", "data_type": "date"}, "file_format": "parquet", "on_schema_change": "fail", "schema": "salesforce_source_{{ var('directed_schema','dev') }}"}, "created_at": 1720574246.230596, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__opportunity_history\"", "raw_code": "{{ config(\n enabled=var('salesforce__opportunity_history_enabled', False),\n materialized='incremental',\n unique_key='history_unique_key',\n incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert',\n partition_by={\n \"field\": \"_fivetran_date\", \n \"data_type\": \"date\"\n } if target.type not in ('spark','databricks') else ['_fivetran_date'],\n file_format='parquet',\n on_schema_change='fail'\n ) \n}}\n\nwith base as (\n\n select * \n from {{ source('salesforce_history','opportunity') }}\n {% if is_incremental() %}\n where cast(_fivetran_start as {{ dbt.type_timestamp() }}) >= (select max(cast((_fivetran_start) as {{ dbt.type_timestamp() }})) from {{ this }} )\n {% else %}\n {% if var('global_history_start_date',[]) or var('opportunity_history_start_date',[]) %}\n where cast(_fivetran_start as {{ dbt.type_timestamp() }}) >= \n {% if var('opportunity_history_start_date', []) %}\n \"{{ var('opportunity_history_start_date') }}\"\n {% else %}\n \"{{ var('global_history_start_date') }}\"\n {% endif %}\n {% endif %}\n {% endif %} \n),\n\nfinal as (\n\n select \n id as opportunity_id,\n cast(_fivetran_start as {{ dbt.type_timestamp() }}) as _fivetran_start,\n cast(_fivetran_end as {{ dbt.type_timestamp() }}) as _fivetran_end,\n cast(_fivetran_start as date) as _fivetran_date,\n {{ dbt_utils.generate_surrogate_key(['id', '_fivetran_start']) }} as history_unique_key,\n\n {{ dbt_utils.star(from=source('salesforce_history','opportunity'),\n except=[\"id\", \"_fivetran_start\", \"_fivetran_end\"]) }}\n from base\n)\n\nselect *\nfrom final", "language": "sql", "refs": [], "sources": [["salesforce_history", "opportunity"], ["salesforce_history", "opportunity"]], "metrics": [], "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt.type_timestamp", "macro.dbt_utils.generate_surrogate_key", "macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}], "model.salesforce_source.stg_salesforce__account_history": [{"database": "postgres", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__account_history", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce_history/stg_salesforce__account_history.sql", "original_file_path": "models/salesforce_history/stg_salesforce__account_history.sql", "unique_id": "model.salesforce_source.stg_salesforce__account_history", "fqn": ["salesforce_source", "salesforce_history", "stg_salesforce__account_history"], "alias": "stg_salesforce__account_history", "checksum": {"name": "sha256", "checksum": "dcce3ab61cac84fa621d4e07fb13c7c8138fa506832c326d31f0eef29d2d8492"}, "config": {"enabled": false, "alias": null, "schema": "salesforce_source_dev", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "history_unique_key", "on_schema_change": "fail", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected", "partition_by": {"field": "_fivetran_date", "data_type": "date"}, "file_format": "parquet"}, "tags": [], "description": "Represents historical records of individual accounts, which are organizations or people involved with your business (such as customers, competitors, and partners).", "columns": {"account_id": {"name": "account_id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_start": {"name": "_fivetran_start", "description": "The time when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The time until which the record was active minus epsilon, where epsilon is the smallest time difference that can be stored in the timestamp type value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_date": {"name": "_fivetran_date", "description": "The date when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "history_unique_key": {"name": "history_unique_key", "description": "Surrogate key hashed on `_fivetran_start` and `account_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "true if it is the currently active record. false if it is a historical version of the record. Only one version of the record can be true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_number": {"name": "account_number", "description": "Account number assigned to this account (not the unique, system-generated ID assigned during creation).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_source": {"name": "account_source", "description": "The source of the account record. For example, Advertisement, Data.com, or Trade Show.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "annual_revenue": {"name": "annual_revenue", "description": "Estimated annual revenue of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_city": {"name": "billing_city", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_country": {"name": "billing_country", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_postal_code": {"name": "billing_postal_code", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_state": {"name": "billing_state", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_street": {"name": "billing_street", "description": "Street address for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_description": {"name": "account_description", "description": "Text description of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "industry": {"name": "industry", "description": "An industry associated with this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is one of the following, whichever is the most recent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "master_record_id": {"name": "master_record_id", "description": "If this object was deleted as the result of a merge, this field contains the ID of the record that was kept. If this object was deleted for any other reason, or has not been deleted, the value is null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_name": {"name": "account_name", "description": "Required. Name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "number_of_employees": {"name": "number_of_employees", "description": "Number of employees working at the company represented by this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "The ID of the user who currently owns this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "ownership": {"name": "ownership", "description": "Ownership type for the account, for example Private, Public, or Subsidiary.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "ID of the parent object, if any.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "rating": {"name": "rating", "description": "The account\u2019s prospect rating, for example Hot, Warm, or Cold.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_city": {"name": "shipping_city", "description": "Details of the shipping address for this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_country": {"name": "shipping_country", "description": "Details of the shipping address for this account. Country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_postal_code": {"name": "shipping_postal_code", "description": "Details of the shipping address for this account. Postal code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_state": {"name": "shipping_state", "description": "Details of the shipping address for this account. State.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_street": {"name": "shipping_street", "description": "The street address of the shipping address for this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of account, for example, Customer, Competitor, or Partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "website": {"name": "website", "description": "The website of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce_history/stg_salesforce_history.yml", "build_path": null, "unrendered_config": {"materialized": "incremental", "enabled": false, "unique_key": "history_unique_key", "incremental_strategy": "delete+insert", "partition_by": {"field": "_fivetran_date", "data_type": "date"}, "file_format": "parquet", "on_schema_change": "fail", "schema": "salesforce_source_{{ var('directed_schema','dev') }}"}, "created_at": 1720574246.2214952, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__account_history\"", "raw_code": "{{ config(\n enabled= var('salesforce__account_history_enabled', False),\n materialized='incremental',\n unique_key='history_unique_key',\n incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert',\n partition_by={\n \"field\": \"_fivetran_date\", \n \"data_type\": \"date\"\n } if target.type not in ('spark','databricks') else ['_fivetran_date'],\n file_format='parquet',\n on_schema_change='fail'\n )\n}}\n\nwith base as (\n\n select * \n from {{ source('salesforce_history', 'account') }}\n {% if is_incremental() %}\n where cast(_fivetran_start as {{ dbt.type_timestamp() }}) >= (select max(cast((_fivetran_start) as {{ dbt.type_timestamp() }})) from {{ this }} )\n {% else %}\n {% if var('global_history_start_date',[]) or var('account_history_start_date',[]) %}\n where cast(_fivetran_start as {{ dbt.type_timestamp() }}) >= \n {% if var('account_history_start_date', []) %}\n \"{{ var('account_history_start_date') }}\"\n {% else %}\n \"{{ var('global_history_start_date') }}\"\n {% endif %}\n {% endif %}\n {% endif %} \n),\n\nfinal as (\n\n select \n id as account_id,\n cast(_fivetran_start as {{ dbt.type_timestamp() }}) as _fivetran_start,\n cast(_fivetran_end as {{ dbt.type_timestamp() }}) as _fivetran_end,\n cast(_fivetran_start as date) as _fivetran_date,\n {{ dbt_utils.generate_surrogate_key(['id', '_fivetran_start']) }} as history_unique_key,\n\n {{ dbt_utils.star(from=source('salesforce_history','account'),\n except=[\"id\", \"_fivetran_start\", \"_fivetran_end\"]) }}\n from base\n)\n\nselect *\nfrom final", "language": "sql", "refs": [], "sources": [["salesforce_history", "account"], ["salesforce_history", "account"]], "metrics": [], "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt.type_timestamp", "macro.dbt_utils.generate_surrogate_key", "macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}], "model.salesforce_source.stg_salesforce__contact_history": [{"database": "postgres", "schema": "zz_dbt_catherine_sf_salesforce_source_dev", "name": "stg_salesforce__contact_history", "resource_type": "model", "package_name": "salesforce_source", "path": "salesforce_history/stg_salesforce__contact_history.sql", "original_file_path": "models/salesforce_history/stg_salesforce__contact_history.sql", "unique_id": "model.salesforce_source.stg_salesforce__contact_history", "fqn": ["salesforce_source", "salesforce_history", "stg_salesforce__contact_history"], "alias": "stg_salesforce__contact_history", "checksum": {"name": "sha256", "checksum": "4c54e59e30090bd2518713a07ac527dac8730b36111e56f7894154e3c1dcadb8"}, "config": {"enabled": false, "alias": null, "schema": "salesforce_source_dev", "database": null, "tags": [], "meta": {}, "group": null, "materialized": "incremental", "incremental_strategy": "delete+insert", "persist_docs": {}, "post-hook": [], "pre-hook": [], "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": "history_unique_key", "on_schema_change": "fail", "on_configuration_change": "apply", "grants": {}, "packages": [], "docs": {"show": true, "node_color": null}, "contract": {"enforced": false, "alias_types": true}, "access": "protected", "partition_by": {"field": "_fivetran_date", "data_type": "date"}, "file_format": "parquet"}, "tags": [], "description": "Represents the historical record of contacts, which are people associated with an account.", "columns": {"contact_id": {"name": "contact_id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_start": {"name": "_fivetran_start", "description": "The time when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The time until which the record was active minus epsilon, where epsilon is the smallest time difference that can be stored in the timestamp type value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_date": {"name": "_fivetran_date", "description": "The date when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "history_unique_key": {"name": "history_unique_key", "description": "Surrogate key hashed on `_fivetran_start` and `contact_id`.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "true if it is the currently active record. false if it is a historical version of the record. Only one version of the record can be true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "ID of the account that\u2019s the parent of this contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "contact_description": {"name": "contact_description", "description": "A description of the contact. Label is Contact Description up to 32 KB.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "The contact\u2019s email address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The contact\u2019s first name up to 40 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "home_phone": {"name": "home_phone", "description": "The contact\u2019s home telephone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "individual_id": {"name": "individual_id", "description": "ID of the data privacy record associated with this contact. This field is available if Data Protection and Privacy is enabled. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is the most recent of either: Due date of the most recent event logged against the record. Due date of the most recently closed task associated with the record.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "Required. Last name of the contact up to 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_source": {"name": "lead_source", "description": "The lead\u2019s source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_city": {"name": "mailing_city", "description": "City mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_country": {"name": "mailing_country", "description": "Country mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_postal_code": {"name": "mailing_postal_code", "description": "Postal code mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_state": {"name": "mailing_state", "description": "State mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_street": {"name": "mailing_street", "description": "Street mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "master_record_id": {"name": "master_record_id", "description": "If this record was deleted as the result of a merge, this field contains the ID of the record that remains. If this record was deleted for any other reason, or has not been deleted, the value is null. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mobile_phone": {"name": "mobile_phone", "description": "Contact\u2019s mobile phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "contact_name": {"name": "contact_name", "description": "Concatenation of FirstName, MiddleName, LastName, and Suffix up to 203 characters, including whitespaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner of the account associated with this contact. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "phone": {"name": "phone", "description": "Telephone number for the contact. Label is Business Phone.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reports_to_id": {"name": "reports_to_id", "description": "This field doesn\u2019t appear if IsPersonAccount is true. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "title": {"name": "title", "description": "Title", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "salesforce_source://models/salesforce_history/stg_salesforce_history.yml", "build_path": null, "unrendered_config": {"materialized": "incremental", "enabled": false, "unique_key": "history_unique_key", "incremental_strategy": "delete+insert", "partition_by": {"field": "_fivetran_date", "data_type": "date"}, "file_format": "parquet", "on_schema_change": "fail", "schema": "salesforce_source_{{ var('directed_schema','dev') }}"}, "created_at": 1720574246.226293, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__contact_history\"", "raw_code": "{{ config(\n enabled=var('salesforce__contact_history_enabled', False),\n materialized='incremental',\n unique_key='history_unique_key',\n incremental_strategy='insert_overwrite' if target.type in ('bigquery', 'spark', 'databricks') else 'delete+insert',\n partition_by={\n \"field\": \"_fivetran_date\", \n \"data_type\": \"date\"\n } if target.type not in ('spark','databricks') else ['_fivetran_date'],\n file_format='parquet',\n on_schema_change='fail'\n ) \n}}\n\nwith base as (\n\n select * \n from {{ source('salesforce_history', 'contact') }}\n {% if is_incremental() %}\n where cast(_fivetran_start as {{ dbt.type_timestamp() }}) >= (select max(cast((_fivetran_start) as {{ dbt.type_timestamp() }})) from {{ this }} )\n {% else %}\n {% if var('global_history_start_date',[]) or var('contact_history_start_date',[]) %}\n where cast(_fivetran_start as {{ dbt.type_timestamp() }}) >= \n {% if var('contact_history_start_date', []) %}\n \"{{ var('contact_history_start_date') }}\"\n {% else %}\n \"{{ var('global_history_start_date') }}\"\n {% endif %}\n {% endif %}\n {% endif %} \n),\n\nfinal as (\n\n select \n id as contact_id,\n cast(_fivetran_start as {{ dbt.type_timestamp() }}) as _fivetran_start,\n cast(_fivetran_end as {{ dbt.type_timestamp() }}) as _fivetran_end,\n cast(_fivetran_start as date) as _fivetran_date,\n {{ dbt_utils.generate_surrogate_key(['id', '_fivetran_start']) }} as history_unique_key,\n\n {{ dbt_utils.star(from=source('salesforce_history','contact'),\n except=[\"id\", \"_fivetran_start\", \"_fivetran_end\"]) }}\n from base\n)\n\nselect *\nfrom final", "language": "sql", "refs": [], "sources": [["salesforce_history", "contact"], ["salesforce_history", "contact"]], "metrics": [], "depends_on": {"macros": ["macro.dbt.is_incremental", "macro.dbt.type_timestamp", "macro.dbt_utils.generate_surrogate_key", "macro.dbt_utils.star"], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "alias_types": true, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}], "source.salesforce_source.salesforce_history.account": [{"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "account", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce_history/src_salesforce_history.yml", "original_file_path": "models/salesforce_history/src_salesforce_history.yml", "unique_id": "source.salesforce_source.salesforce_history.account", "fqn": ["salesforce_source", "salesforce_history", "salesforce_history", "account"], "source_name": "salesforce_history", "source_description": "", "loader": "fivetran", "identifier": "sf_account_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 24, "period": "hour"}, "error_after": {"count": 48, "period": "hour"}, "filter": null}, "external": null, "description": "Represents historical records of individual accounts, which are organizations or people involved with your business (such as customers, competitors, and partners).", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "true if it is the currently active record. false if it is a historical version of the record. Only one version of the record can be true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_start": {"name": "_fivetran_start", "description": "The time when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The time until which the record was active minus epsilon, where epsilon is the smallest time difference that can be stored in the timestamp type value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_number": {"name": "account_number", "description": "Account number assigned to this account (not the unique, system-generated ID assigned during creation).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_source": {"name": "account_source", "description": "The source of the account record. For example, Advertisement, Data.com, or Trade Show.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "annual_revenue": {"name": "annual_revenue", "description": "Estimated annual revenue of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_city": {"name": "billing_city", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_country": {"name": "billing_country", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_postal_code": {"name": "billing_postal_code", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_state": {"name": "billing_state", "description": "Details for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "billing_street": {"name": "billing_street", "description": "Street address for the billing address of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Text description of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "industry": {"name": "industry", "description": "An industry associated with this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is one of the following, whichever is the most recent.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "master_record_id": {"name": "master_record_id", "description": "If this object was deleted as the result of a merge, this field contains the ID of the record that was kept. If this object was deleted for any other reason, or has not been deleted, the value is null.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Required. Name of the account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "number_of_employees": {"name": "number_of_employees", "description": "Number of employees working at the company represented by this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "The ID of the user who currently owns this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "ownership": {"name": "ownership", "description": "Ownership type for the account, for example Private, Public, or Subsidiary.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "parent_id": {"name": "parent_id", "description": "ID of the parent object, if any.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "rating": {"name": "rating", "description": "The account\u2019s prospect rating, for example Hot, Warm, or Cold.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_city": {"name": "shipping_city", "description": "Details of the shipping address for this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_country": {"name": "shipping_country", "description": "Details of the shipping address for this account. Country.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_postal_code": {"name": "shipping_postal_code", "description": "Details of the shipping address for this account. Postal code.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_state": {"name": "shipping_state", "description": "Details of the shipping address for this account. State.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "shipping_street": {"name": "shipping_street", "description": "The street address of the shipping address for this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of account, for example, Customer, Competitor, or Partner.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "website": {"name": "website", "description": "The website of this account.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": false}, "patch_path": null, "unrendered_config": {"enabled": false}, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_account_history_data\"", "created_at": 1720574246.42726}], "source.salesforce_source.salesforce_history.contact": [{"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "contact", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce_history/src_salesforce_history.yml", "original_file_path": "models/salesforce_history/src_salesforce_history.yml", "unique_id": "source.salesforce_source.salesforce_history.contact", "fqn": ["salesforce_source", "salesforce_history", "salesforce_history", "contact"], "source_name": "salesforce_history", "source_description": "", "loader": "fivetran", "identifier": "sf_contact_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 24, "period": "hour"}, "error_after": {"count": 48, "period": "hour"}, "filter": null}, "external": null, "description": "Represents the historical record of contacts, which are people associated with an account.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "true if it is the currently active record. false if it is a historical version of the record. Only one version of the record can be true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_start": {"name": "_fivetran_start", "description": "The time when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The time until which the record was active minus epsilon, where epsilon is the smallest time difference that can be stored in the timestamp type value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "ID of the account that\u2019s the parent of this contact.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "A description of the contact. Label is Contact Description up to 32 KB.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "email": {"name": "email", "description": "The contact\u2019s email address.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "first_name": {"name": "first_name", "description": "The contact\u2019s first name up to 40 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "home_phone": {"name": "home_phone", "description": "The contact\u2019s home telephone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "individual_id": {"name": "individual_id", "description": "ID of the data privacy record associated with this contact. This field is available if Data Protection and Privacy is enabled. This is a relationship field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is the most recent of either: Due date of the most recent event logged against the record. Due date of the most recently closed task associated with the record.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_by_id": {"name": "last_modified_by_id", "description": "Last Modified By ID", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_modified_date": {"name": "last_modified_date", "description": "Last Modified Date", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_name": {"name": "last_name", "description": "Required. Last name of the contact up to 80 characters.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_source": {"name": "lead_source", "description": "The lead\u2019s source.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_city": {"name": "mailing_city", "description": "City mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_country": {"name": "mailing_country", "description": "Country mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_postal_code": {"name": "mailing_postal_code", "description": "Postal code mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_state": {"name": "mailing_state", "description": "State mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mailing_street": {"name": "mailing_street", "description": "Street mailing address details.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "master_record_id": {"name": "master_record_id", "description": "If this record was deleted as the result of a merge, this field contains the ID of the record that remains. If this record was deleted for any other reason, or has not been deleted, the value is null. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "mobile_phone": {"name": "mobile_phone", "description": "Contact\u2019s mobile phone number.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Concatenation of FirstName, MiddleName, LastName, and Suffix up to 203 characters, including whitespaces.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "The ID of the owner of the account associated with this contact. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "phone": {"name": "phone", "description": "Telephone number for the contact. Label is Business Phone.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "reports_to_id": {"name": "reports_to_id", "description": "This field doesn\u2019t appear if IsPersonAccount is true. This is a relationship field.\n", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "title": {"name": "title", "description": "Title", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": false}, "patch_path": null, "unrendered_config": {"enabled": false}, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_contact_history_data\"", "created_at": 1720574246.428076}], "source.salesforce_source.salesforce_history.opportunity": [{"database": "postgres", "schema": "zz_dbt_catherine_sf", "name": "opportunity", "resource_type": "source", "package_name": "salesforce_source", "path": "models/salesforce_history/src_salesforce_history.yml", "original_file_path": "models/salesforce_history/src_salesforce_history.yml", "unique_id": "source.salesforce_source.salesforce_history.opportunity", "fqn": ["salesforce_source", "salesforce_history", "salesforce_history", "opportunity"], "source_name": "salesforce_history", "source_description": "", "loader": "fivetran", "identifier": "sf_opportunity_history_data", "quoting": {"database": null, "schema": null, "identifier": null, "column": null}, "loaded_at_field": "_fivetran_synced", "freshness": {"warn_after": {"count": 24, "period": "hour"}, "error_after": {"count": 48, "period": "hour"}, "filter": null}, "external": null, "description": "Represents historical records of opportunities, which are sales or pending deals.", "columns": {"id": {"name": "id", "description": "The unique, system-generated ID assigned during creation.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_active": {"name": "_fivetran_active", "description": "true if it is the currently active record. false if it is a historical version of the record. Only one version of the record can be true.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_start": {"name": "_fivetran_start", "description": "The time when the record was first created or modified in the source, based on a timestamp value in the source table that monotonically increases over time with data change or update.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_end": {"name": "_fivetran_end", "description": "The time until which the record was active minus epsilon, where epsilon is the smallest time difference that can be stored in the timestamp type value.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "_fivetran_synced": {"name": "_fivetran_synced", "description": "The time at which fivetran last synced this record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "account_id": {"name": "account_id", "description": "ID of the account associated with this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "amount": {"name": "amount", "description": "Estimated total sale amount. For opportunities with products, the amount is the sum of the related products.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "campaign_id": {"name": "campaign_id", "description": "ID of a related Campaign. This field is defined only for those organizations that have the campaign feature Campaigns enabled.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "close_date": {"name": "close_date", "description": "Required. Date when the opportunity is expected to close.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "created_date": {"name": "created_date", "description": "Date when the opportunity is was created.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "description": {"name": "description", "description": "Text description of the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "expected_revenue": {"name": "expected_revenue", "description": "Read-only field that is equal to the product of the opportunity Amount field and the Probability.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal": {"name": "fiscal", "description": "If fiscal years are not enabled, the name of the fiscal quarter or period in which the opportunity CloseDate falls.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal_quarter": {"name": "fiscal_quarter", "description": "Represents the fiscal quarter. Valid values are 1, 2, 3, or 4.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "fiscal_year": {"name": "fiscal_year", "description": "Represents the fiscal year, for example, 2006.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_category": {"name": "forecast_category", "description": "Restricted picklist field.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "forecast_category_name": {"name": "forecast_category_name", "description": "The name of the forecast category.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_open_activity": {"name": "has_open_activity", "description": "Indicates whether an opportunity has an open event or task (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_opportunity_line_item": {"name": "has_opportunity_line_item", "description": "Read-only field that indicates whether the opportunity has associated line items. A value of true means that Opportunity line items have been created for the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "has_overdue_task": {"name": "has_overdue_task", "description": "Indicates whether an opportunity has an overdue task (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_closed": {"name": "is_closed", "description": "True, if Stage Name Label is Closed.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_deleted": {"name": "is_deleted", "description": "Indicates whether the object has been moved to the Recycle Bin (true) or not (false).", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "is_won": {"name": "is_won", "description": "True, if Stage Name Label is Won.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_activity_date": {"name": "last_activity_date", "description": "Value is one of the following, whichever is the most recent:Due date of the most recent event logged against the record or Due date of the most recently closed task associated with the record.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_referenced_date": {"name": "last_referenced_date", "description": "The timestamp when the current user last accessed this record, a record related to this record, or a list view.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "last_viewed_date": {"name": "last_viewed_date", "description": "The timestamp when the current user last viewed this record or list view. If this value is null, the user might have only accessed this record or list view (LastReferencedDate) but not viewed it.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "lead_source": {"name": "lead_source", "description": "Source of this opportunity, such as Advertisement or Trade Show.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "Required. A name for this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "next_step": {"name": "next_step", "description": "Description of next task in closing opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "owner_id": {"name": "owner_id", "description": "ID of the User who has been assigned to work this opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "probability": {"name": "probability", "description": "Percentage of estimated confidence in closing the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "record_type_id": {"name": "record_type_id", "description": "ID of the record type assigned to this object.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "stage_name": {"name": "stage_name", "description": "Required. Current stage of this record. The StageName field controls several other fields on an opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "synced_quote_id": {"name": "synced_quote_id", "description": "The ID of the Quote that syncs with the opportunity.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "type": {"name": "type", "description": "Type of opportunity. For example, Existing Business or New Business.", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "source_meta": {}, "tags": [], "config": {"enabled": false}, "patch_path": null, "unrendered_config": {"enabled": false}, "relation_name": "\"postgres\".\"zz_dbt_catherine_sf\".\"sf_opportunity_history_data\"", "created_at": 1720574246.428236}]}, "parent_map": {"seed.salesforce_source_integration_tests.sf_lead_data": [], "seed.salesforce_source_integration_tests.sf_product_2_data": [], "seed.salesforce_source_integration_tests.sf_user_role_data": [], "seed.salesforce_source_integration_tests.sf_account_data": [], "seed.salesforce_source_integration_tests.sf_opportunity_line_item_data": [], "seed.salesforce_source_integration_tests.sf_user_data": [], "seed.salesforce_source_integration_tests.sf_contact_data": [], "seed.salesforce_source_integration_tests.sf_opportunity_data": [], "seed.salesforce_source_integration_tests.sf_opportunity_history_data": [], "seed.salesforce_source_integration_tests.sf_order_data": [], "seed.salesforce_source_integration_tests.sf_event_data": [], "seed.salesforce_source_integration_tests.sf_contact_history_data": [], "seed.salesforce_source_integration_tests.sf_account_history_data": [], "seed.salesforce_source_integration_tests.sf_task_data": [], "model.salesforce_source.stg_salesforce__opportunity": ["source.salesforce_source.salesforce.opportunity"], "model.salesforce_source.stg_salesforce__user_role": ["source.salesforce_source.salesforce.user_role"], "model.salesforce_source.stg_salesforce__contact": ["source.salesforce_source.salesforce.contact"], "model.salesforce_source.stg_salesforce__account": ["source.salesforce_source.salesforce.account"], "model.salesforce_source.stg_salesforce__lead": ["source.salesforce_source.salesforce.lead"], "model.salesforce_source.stg_salesforce__order": ["source.salesforce_source.salesforce.order"], "model.salesforce_source.stg_salesforce__event": ["source.salesforce_source.salesforce.event"], "model.salesforce_source.stg_salesforce__product_2": ["source.salesforce_source.salesforce.product_2"], "model.salesforce_source.stg_salesforce__opportunity_line_item": ["source.salesforce_source.salesforce.opportunity_line_item"], "model.salesforce_source.stg_salesforce__user": ["source.salesforce_source.salesforce.user"], "model.salesforce_source.stg_salesforce__task": ["source.salesforce_source.salesforce.task"], "test.salesforce_source.not_null_stg_salesforce__account_history_history_unique_key.e946c6dd0e": [], "test.salesforce_source.unique_stg_salesforce__account_history_history_unique_key.c378da769f": [], "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__account_history_account_id___fivetran_start___fivetran_end.7db755dfc6": [], "test.salesforce_source.not_null_stg_salesforce__contact_history_history_unique_key.673cb181cf": [], "test.salesforce_source.unique_stg_salesforce__contact_history_history_unique_key.215181e10d": [], "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__contact_history_contact_id___fivetran_start___fivetran_end.2d7ff092ee": [], "test.salesforce_source.not_null_stg_salesforce__opportunity_history_history_unique_key.32fa6270e0": [], "test.salesforce_source.unique_stg_salesforce__opportunity_history_history_unique_key.b5b08bda67": [], "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__opportunity_history_opportunity_id___fivetran_start___fivetran_end.1209811435": [], "test.salesforce_source.not_null_stg_salesforce__account_account_id.1e0ff361d4": ["model.salesforce_source.stg_salesforce__account"], "test.salesforce_source.unique_stg_salesforce__account_account_id.6d58a39ba7": ["model.salesforce_source.stg_salesforce__account"], "test.salesforce_source.not_null_stg_salesforce__opportunity_opportunity_id.234c5e60bd": ["model.salesforce_source.stg_salesforce__opportunity"], "test.salesforce_source.unique_stg_salesforce__opportunity_opportunity_id.367b0f577a": ["model.salesforce_source.stg_salesforce__opportunity"], "test.salesforce_source.not_null_stg_salesforce__user_user_id.ac0ab26d65": ["model.salesforce_source.stg_salesforce__user"], "test.salesforce_source.unique_stg_salesforce__user_user_id.9a29b41152": ["model.salesforce_source.stg_salesforce__user"], "test.salesforce_source.not_null_stg_salesforce__user_role_user_role_id.949036e9bd": ["model.salesforce_source.stg_salesforce__user_role"], "test.salesforce_source.unique_stg_salesforce__user_role_user_role_id.1259050718": ["model.salesforce_source.stg_salesforce__user_role"], "test.salesforce_source.not_null_stg_salesforce__contact_contact_id.d7c02bef78": ["model.salesforce_source.stg_salesforce__contact"], "test.salesforce_source.unique_stg_salesforce__contact_contact_id.0cc2c0609e": ["model.salesforce_source.stg_salesforce__contact"], "test.salesforce_source.not_null_stg_salesforce__event_event_id.e964b30db8": ["model.salesforce_source.stg_salesforce__event"], "test.salesforce_source.unique_stg_salesforce__event_event_id.13f7c8c0d9": ["model.salesforce_source.stg_salesforce__event"], "test.salesforce_source.not_null_stg_salesforce__lead_lead_id.e2ba6b2026": ["model.salesforce_source.stg_salesforce__lead"], "test.salesforce_source.unique_stg_salesforce__lead_lead_id.ba8b21e282": ["model.salesforce_source.stg_salesforce__lead"], "test.salesforce_source.not_null_stg_salesforce__opportunity_line_item_opportunity_line_item_id.b5d2465072": ["model.salesforce_source.stg_salesforce__opportunity_line_item"], "test.salesforce_source.unique_stg_salesforce__opportunity_line_item_opportunity_line_item_id.c18042d902": ["model.salesforce_source.stg_salesforce__opportunity_line_item"], "test.salesforce_source.not_null_stg_salesforce__order_order_id.4782f3b34f": ["model.salesforce_source.stg_salesforce__order"], "test.salesforce_source.unique_stg_salesforce__order_order_id.12a96b4e3c": ["model.salesforce_source.stg_salesforce__order"], "test.salesforce_source.not_null_stg_salesforce__product_2_product_2_id.84aed29e8a": ["model.salesforce_source.stg_salesforce__product_2"], "test.salesforce_source.unique_stg_salesforce__product_2_product_2_id.b4bc489d61": ["model.salesforce_source.stg_salesforce__product_2"], "test.salesforce_source.not_null_stg_salesforce__task_task_id.aabe11a5d9": ["model.salesforce_source.stg_salesforce__task"], "test.salesforce_source.unique_stg_salesforce__task_task_id.73684ed605": ["model.salesforce_source.stg_salesforce__task"], "source.salesforce_source.salesforce.account": [], "source.salesforce_source.salesforce.opportunity": [], "source.salesforce_source.salesforce.user": [], "source.salesforce_source.salesforce.user_role": [], "source.salesforce_source.salesforce.contact": [], "source.salesforce_source.salesforce.event": [], "source.salesforce_source.salesforce.lead": [], "source.salesforce_source.salesforce.opportunity_line_item": [], "source.salesforce_source.salesforce.order": [], "source.salesforce_source.salesforce.product_2": [], "source.salesforce_source.salesforce.task": [], "source.salesforce_source.salesforce.fivetran_formula": [], "source.salesforce_source.salesforce.fivetran_formula_model": []}, "child_map": {"seed.salesforce_source_integration_tests.sf_lead_data": [], "seed.salesforce_source_integration_tests.sf_product_2_data": [], "seed.salesforce_source_integration_tests.sf_user_role_data": [], "seed.salesforce_source_integration_tests.sf_account_data": [], "seed.salesforce_source_integration_tests.sf_opportunity_line_item_data": [], "seed.salesforce_source_integration_tests.sf_user_data": [], "seed.salesforce_source_integration_tests.sf_contact_data": [], "seed.salesforce_source_integration_tests.sf_opportunity_data": [], "seed.salesforce_source_integration_tests.sf_opportunity_history_data": [], "seed.salesforce_source_integration_tests.sf_order_data": [], "seed.salesforce_source_integration_tests.sf_event_data": [], "seed.salesforce_source_integration_tests.sf_contact_history_data": [], "seed.salesforce_source_integration_tests.sf_account_history_data": [], "seed.salesforce_source_integration_tests.sf_task_data": [], "model.salesforce_source.stg_salesforce__opportunity": ["test.salesforce_source.not_null_stg_salesforce__opportunity_opportunity_id.234c5e60bd", "test.salesforce_source.unique_stg_salesforce__opportunity_opportunity_id.367b0f577a"], "model.salesforce_source.stg_salesforce__user_role": ["test.salesforce_source.not_null_stg_salesforce__user_role_user_role_id.949036e9bd", "test.salesforce_source.unique_stg_salesforce__user_role_user_role_id.1259050718"], "model.salesforce_source.stg_salesforce__contact": ["test.salesforce_source.not_null_stg_salesforce__contact_contact_id.d7c02bef78", "test.salesforce_source.unique_stg_salesforce__contact_contact_id.0cc2c0609e"], "model.salesforce_source.stg_salesforce__account": ["test.salesforce_source.not_null_stg_salesforce__account_account_id.1e0ff361d4", "test.salesforce_source.unique_stg_salesforce__account_account_id.6d58a39ba7"], "model.salesforce_source.stg_salesforce__lead": ["test.salesforce_source.not_null_stg_salesforce__lead_lead_id.e2ba6b2026", "test.salesforce_source.unique_stg_salesforce__lead_lead_id.ba8b21e282"], "model.salesforce_source.stg_salesforce__order": ["test.salesforce_source.not_null_stg_salesforce__order_order_id.4782f3b34f", "test.salesforce_source.unique_stg_salesforce__order_order_id.12a96b4e3c"], "model.salesforce_source.stg_salesforce__event": ["test.salesforce_source.not_null_stg_salesforce__event_event_id.e964b30db8", "test.salesforce_source.unique_stg_salesforce__event_event_id.13f7c8c0d9"], "model.salesforce_source.stg_salesforce__product_2": ["test.salesforce_source.not_null_stg_salesforce__product_2_product_2_id.84aed29e8a", "test.salesforce_source.unique_stg_salesforce__product_2_product_2_id.b4bc489d61"], "model.salesforce_source.stg_salesforce__opportunity_line_item": ["test.salesforce_source.not_null_stg_salesforce__opportunity_line_item_opportunity_line_item_id.b5d2465072", "test.salesforce_source.unique_stg_salesforce__opportunity_line_item_opportunity_line_item_id.c18042d902"], "model.salesforce_source.stg_salesforce__user": ["test.salesforce_source.not_null_stg_salesforce__user_user_id.ac0ab26d65", "test.salesforce_source.unique_stg_salesforce__user_user_id.9a29b41152"], "model.salesforce_source.stg_salesforce__task": ["test.salesforce_source.not_null_stg_salesforce__task_task_id.aabe11a5d9", "test.salesforce_source.unique_stg_salesforce__task_task_id.73684ed605"], "test.salesforce_source.not_null_stg_salesforce__account_history_history_unique_key.e946c6dd0e": [], "test.salesforce_source.unique_stg_salesforce__account_history_history_unique_key.c378da769f": [], "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__account_history_account_id___fivetran_start___fivetran_end.7db755dfc6": [], "test.salesforce_source.not_null_stg_salesforce__contact_history_history_unique_key.673cb181cf": [], "test.salesforce_source.unique_stg_salesforce__contact_history_history_unique_key.215181e10d": [], "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__contact_history_contact_id___fivetran_start___fivetran_end.2d7ff092ee": [], "test.salesforce_source.not_null_stg_salesforce__opportunity_history_history_unique_key.32fa6270e0": [], "test.salesforce_source.unique_stg_salesforce__opportunity_history_history_unique_key.b5b08bda67": [], "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__opportunity_history_opportunity_id___fivetran_start___fivetran_end.1209811435": [], "test.salesforce_source.not_null_stg_salesforce__account_account_id.1e0ff361d4": [], "test.salesforce_source.unique_stg_salesforce__account_account_id.6d58a39ba7": [], "test.salesforce_source.not_null_stg_salesforce__opportunity_opportunity_id.234c5e60bd": [], "test.salesforce_source.unique_stg_salesforce__opportunity_opportunity_id.367b0f577a": [], "test.salesforce_source.not_null_stg_salesforce__user_user_id.ac0ab26d65": [], "test.salesforce_source.unique_stg_salesforce__user_user_id.9a29b41152": [], "test.salesforce_source.not_null_stg_salesforce__user_role_user_role_id.949036e9bd": [], "test.salesforce_source.unique_stg_salesforce__user_role_user_role_id.1259050718": [], "test.salesforce_source.not_null_stg_salesforce__contact_contact_id.d7c02bef78": [], "test.salesforce_source.unique_stg_salesforce__contact_contact_id.0cc2c0609e": [], "test.salesforce_source.not_null_stg_salesforce__event_event_id.e964b30db8": [], "test.salesforce_source.unique_stg_salesforce__event_event_id.13f7c8c0d9": [], "test.salesforce_source.not_null_stg_salesforce__lead_lead_id.e2ba6b2026": [], "test.salesforce_source.unique_stg_salesforce__lead_lead_id.ba8b21e282": [], "test.salesforce_source.not_null_stg_salesforce__opportunity_line_item_opportunity_line_item_id.b5d2465072": [], "test.salesforce_source.unique_stg_salesforce__opportunity_line_item_opportunity_line_item_id.c18042d902": [], "test.salesforce_source.not_null_stg_salesforce__order_order_id.4782f3b34f": [], "test.salesforce_source.unique_stg_salesforce__order_order_id.12a96b4e3c": [], "test.salesforce_source.not_null_stg_salesforce__product_2_product_2_id.84aed29e8a": [], "test.salesforce_source.unique_stg_salesforce__product_2_product_2_id.b4bc489d61": [], "test.salesforce_source.not_null_stg_salesforce__task_task_id.aabe11a5d9": [], "test.salesforce_source.unique_stg_salesforce__task_task_id.73684ed605": [], "source.salesforce_source.salesforce.account": ["model.salesforce_source.stg_salesforce__account"], "source.salesforce_source.salesforce.opportunity": ["model.salesforce_source.stg_salesforce__opportunity"], "source.salesforce_source.salesforce.user": ["model.salesforce_source.stg_salesforce__user"], "source.salesforce_source.salesforce.user_role": ["model.salesforce_source.stg_salesforce__user_role"], "source.salesforce_source.salesforce.contact": ["model.salesforce_source.stg_salesforce__contact"], "source.salesforce_source.salesforce.event": ["model.salesforce_source.stg_salesforce__event"], "source.salesforce_source.salesforce.lead": ["model.salesforce_source.stg_salesforce__lead"], "source.salesforce_source.salesforce.opportunity_line_item": ["model.salesforce_source.stg_salesforce__opportunity_line_item"], "source.salesforce_source.salesforce.order": ["model.salesforce_source.stg_salesforce__order"], "source.salesforce_source.salesforce.product_2": ["model.salesforce_source.stg_salesforce__product_2"], "source.salesforce_source.salesforce.task": ["model.salesforce_source.stg_salesforce__task"], "source.salesforce_source.salesforce.fivetran_formula": [], "source.salesforce_source.salesforce.fivetran_formula_model": []}, "group_map": {}, "saved_queries": {}, "semantic_models": {}, "unit_tests": {}} \ No newline at end of file diff --git a/docs/run_results.json b/docs/run_results.json index d8c6ae5..2f41af5 100644 --- a/docs/run_results.json +++ b/docs/run_results.json @@ -1 +1 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/run-results/v4.json", "dbt_version": "1.6.3", "generated_at": "2023-10-30T18:30:50.661979Z", "invocation_id": "481200b0-f7e9-41c0-8b43-483f2b50ff1c", "env": {}}, "results": [{"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:47.255741Z", "completed_at": "2023-10-30T18:30:48.001492Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:48.002211Z", "completed_at": "2023-10-30T18:30:48.002231Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.8746678829193115, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__contact_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:47.217505Z", "completed_at": "2023-10-30T18:30:48.013498Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:48.014194Z", "completed_at": "2023-10-30T18:30:48.014201Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.8848061561584473, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__account_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:47.208124Z", "completed_at": "2023-10-30T18:30:48.073808Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:48.074511Z", "completed_at": "2023-10-30T18:30:48.074519Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.9486618041992188, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__account"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:47.249153Z", "completed_at": "2023-10-30T18:30:48.131058Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:48.131740Z", "completed_at": "2023-10-30T18:30:48.131755Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.9979219436645508, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__contact"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:48.093140Z", "completed_at": "2023-10-30T18:30:48.837683Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:48.838693Z", "completed_at": "2023-10-30T18:30:48.838700Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.8185710906982422, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__lead"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:48.083212Z", "completed_at": "2023-10-30T18:30:48.836638Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:48.837360Z", "completed_at": "2023-10-30T18:30:48.837368Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.8288009166717529, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__event"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:48.155804Z", "completed_at": "2023-10-30T18:30:48.887075Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:48.887881Z", "completed_at": "2023-10-30T18:30:48.887889Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.8058061599731445, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__opportunity"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:48.206205Z", "completed_at": "2023-10-30T18:30:48.929325Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:48.929964Z", "completed_at": "2023-10-30T18:30:48.929972Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.7966310977935791, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__opportunity_history"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:48.916102Z", "completed_at": "2023-10-30T18:30:49.721628Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.723948Z", "completed_at": "2023-10-30T18:30:49.723957Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.8847610950469971, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__opportunity_line_item"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:48.962468Z", "completed_at": "2023-10-30T18:30:49.724943Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.726307Z", "completed_at": "2023-10-30T18:30:49.726309Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.837385892868042, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__product_2"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:48.921152Z", "completed_at": "2023-10-30T18:30:49.724308Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.725946Z", "completed_at": "2023-10-30T18:30:49.725949Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.8850500583648682, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__order"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.813493Z", "completed_at": "2023-10-30T18:30:49.814678Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.816454Z", "completed_at": "2023-10-30T18:30:49.816463Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.01512598991394043, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_account_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.818343Z", "completed_at": "2023-10-30T18:30:49.819685Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.820507Z", "completed_at": "2023-10-30T18:30:49.820518Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.0032889842987060547, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_account_history_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.822381Z", "completed_at": "2023-10-30T18:30:49.823784Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.824383Z", "completed_at": "2023-10-30T18:30:49.824388Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.003122091293334961, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_contact_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.826363Z", "completed_at": "2023-10-30T18:30:49.828149Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.828735Z", "completed_at": "2023-10-30T18:30:49.828739Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.0035750865936279297, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_contact_history_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.830520Z", "completed_at": "2023-10-30T18:30:49.831661Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.832168Z", "completed_at": "2023-10-30T18:30:49.832176Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.002809762954711914, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_event_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.834072Z", "completed_at": "2023-10-30T18:30:49.835240Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.835950Z", "completed_at": "2023-10-30T18:30:49.835955Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.0031087398529052734, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_lead_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.838016Z", "completed_at": "2023-10-30T18:30:49.839263Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.839814Z", "completed_at": "2023-10-30T18:30:49.839818Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.00292205810546875, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_opportunity_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.841531Z", "completed_at": "2023-10-30T18:30:49.842622Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.843166Z", "completed_at": "2023-10-30T18:30:49.843170Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.0026559829711914062, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_opportunity_history_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.844866Z", "completed_at": "2023-10-30T18:30:49.845957Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.846450Z", "completed_at": "2023-10-30T18:30:49.846454Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.002668142318725586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_opportunity_line_item_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.003680Z", "completed_at": "2023-10-30T18:30:49.776368Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.777088Z", "completed_at": "2023-10-30T18:30:49.777095Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.8456859588623047, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__task"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.849014Z", "completed_at": "2023-10-30T18:30:49.850857Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.852222Z", "completed_at": "2023-10-30T18:30:49.852229Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.005180835723876953, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_order_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.853361Z", "completed_at": "2023-10-30T18:30:49.854452Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.855695Z", "completed_at": "2023-10-30T18:30:49.855701Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.0046732425689697266, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_product_2_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.856794Z", "completed_at": "2023-10-30T18:30:49.857925Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.859200Z", "completed_at": "2023-10-30T18:30:49.859203Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.004621028900146484, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_task_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.860306Z", "completed_at": "2023-10-30T18:30:49.861385Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.862750Z", "completed_at": "2023-10-30T18:30:49.862758Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.004639863967895508, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_user_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.863769Z", "completed_at": "2023-10-30T18:30:49.864878Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.866155Z", "completed_at": "2023-10-30T18:30:49.866159Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.004502773284912109, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_user_role_data"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.867177Z", "completed_at": "2023-10-30T18:30:49.885610Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.887835Z", "completed_at": "2023-10-30T18:30:49.887842Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.022691726684570312, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__contact_history_contact_id___fivetran_start___fivetran_end.2d7ff092ee"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.879271Z", "completed_at": "2023-10-30T18:30:49.888840Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.890255Z", "completed_at": "2023-10-30T18:30:49.890258Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.012456178665161133, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__contact_history_history_unique_key.673cb181cf"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.891371Z", "completed_at": "2023-10-30T18:30:49.897448Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.901661Z", "completed_at": "2023-10-30T18:30:49.901666Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.012375116348266602, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__contact_history_history_unique_key.215181e10d"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.897772Z", "completed_at": "2023-10-30T18:30:49.902640Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.903973Z", "completed_at": "2023-10-30T18:30:49.903977Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.008014202117919922, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__account_history_account_id___fivetran_start___fivetran_end.7db755dfc6"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.905111Z", "completed_at": "2023-10-30T18:30:49.909563Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.914696Z", "completed_at": "2023-10-30T18:30:49.914704Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.011757850646972656, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__account_history_history_unique_key.e946c6dd0e"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.909967Z", "completed_at": "2023-10-30T18:30:49.916531Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.921733Z", "completed_at": "2023-10-30T18:30:49.921749Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.013612747192382812, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__account_history_history_unique_key.c378da769f"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.917365Z", "completed_at": "2023-10-30T18:30:49.923188Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.924380Z", "completed_at": "2023-10-30T18:30:49.924394Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.04767203330993652, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__account_account_id.1e0ff361d4"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.924684Z", "completed_at": "2023-10-30T18:30:49.965038Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.969157Z", "completed_at": "2023-10-30T18:30:49.969169Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.04623103141784668, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__account_account_id.6d58a39ba7"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.965825Z", "completed_at": "2023-10-30T18:30:49.970796Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.974690Z", "completed_at": "2023-10-30T18:30:49.974694Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.010602951049804688, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__contact_contact_id.d7c02bef78"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.971589Z", "completed_at": "2023-10-30T18:30:49.976011Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.977251Z", "completed_at": "2023-10-30T18:30:49.977255Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.010512113571166992, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__contact_contact_id.0cc2c0609e"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.977552Z", "completed_at": "2023-10-30T18:30:49.982356Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.985887Z", "completed_at": "2023-10-30T18:30:49.985893Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.010076284408569336, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__lead_lead_id.e2ba6b2026"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.982642Z", "completed_at": "2023-10-30T18:30:49.986657Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.988107Z", "completed_at": "2023-10-30T18:30:49.988111Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.0072498321533203125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__lead_lead_id.ba8b21e282"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.989192Z", "completed_at": "2023-10-30T18:30:49.994369Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.997276Z", "completed_at": "2023-10-30T18:30:49.997284Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.010090112686157227, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__event_event_id.e964b30db8"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.994608Z", "completed_at": "2023-10-30T18:30:49.998147Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:49.999410Z", "completed_at": "2023-10-30T18:30:49.999414Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.006185054779052734, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__event_event_id.13f7c8c0d9"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:50.000397Z", "completed_at": "2023-10-30T18:30:50.003890Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:50.006776Z", "completed_at": "2023-10-30T18:30:50.006783Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.00823974609375, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__opportunity_opportunity_id.234c5e60bd"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:50.004119Z", "completed_at": "2023-10-30T18:30:50.007551Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:50.008829Z", "completed_at": "2023-10-30T18:30:50.008833Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.0061609745025634766, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__opportunity_opportunity_id.367b0f577a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:50.009731Z", "completed_at": "2023-10-30T18:30:50.013659Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:50.016807Z", "completed_at": "2023-10-30T18:30:50.016819Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.008928060531616211, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.dbt_utils_unique_combination_of_columns_stg_salesforce__opportunity_history_opportunity_id___fivetran_start___fivetran_end.1209811435"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:50.013979Z", "completed_at": "2023-10-30T18:30:50.017643Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:50.019026Z", "completed_at": "2023-10-30T18:30:50.019032Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.006682872772216797, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__opportunity_history_history_unique_key.32fa6270e0"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:50.020091Z", "completed_at": "2023-10-30T18:30:50.024315Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:50.027489Z", "completed_at": "2023-10-30T18:30:50.027496Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.009434938430786133, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__opportunity_history_history_unique_key.b5b08bda67"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:50.024563Z", "completed_at": "2023-10-30T18:30:50.028557Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:50.029583Z", "completed_at": "2023-10-30T18:30:50.029587Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.008772134780883789, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__opportunity_line_item_opportunity_line_item_id.b5d2465072"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:50.029817Z", "completed_at": "2023-10-30T18:30:50.033399Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:50.036811Z", "completed_at": "2023-10-30T18:30:50.036817Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.008542060852050781, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__opportunity_line_item_opportunity_line_item_id.c18042d902"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:50.034114Z", "completed_at": "2023-10-30T18:30:50.038382Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:50.041642Z", "completed_at": "2023-10-30T18:30:50.041657Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.009057998657226562, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__product_2_product_2_id.84aed29e8a"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:50.039138Z", "completed_at": "2023-10-30T18:30:50.042705Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:50.043868Z", "completed_at": "2023-10-30T18:30:50.043873Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.008877277374267578, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__product_2_product_2_id.b4bc489d61"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:50.044129Z", "completed_at": "2023-10-30T18:30:50.048039Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:50.051900Z", "completed_at": "2023-10-30T18:30:50.051907Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.009451866149902344, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__order_order_id.4782f3b34f"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:50.048752Z", "completed_at": "2023-10-30T18:30:50.052999Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:50.054118Z", "completed_at": "2023-10-30T18:30:50.054124Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.009253740310668945, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__order_order_id.12a96b4e3c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:50.054434Z", "completed_at": "2023-10-30T18:30:50.057943Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:50.061437Z", "completed_at": "2023-10-30T18:30:50.061444Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.008618354797363281, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__task_task_id.aabe11a5d9"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:50.058705Z", "completed_at": "2023-10-30T18:30:50.062329Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:50.062800Z", "completed_at": "2023-10-30T18:30:50.062804Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.005544900894165039, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__task_task_id.73684ed605"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.808629Z", "completed_at": "2023-10-30T18:30:50.559490Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:50.560763Z", "completed_at": "2023-10-30T18:30:50.560777Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.8343300819396973, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__user_role"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:49.803200Z", "completed_at": "2023-10-30T18:30:50.559830Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:50.561122Z", "completed_at": "2023-10-30T18:30:50.561125Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.8353259563446045, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__user"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:50.648395Z", "completed_at": "2023-10-30T18:30:50.654691Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:50.656869Z", "completed_at": "2023-10-30T18:30:50.656879Z"}], "thread_id": "Thread-1 (worker)", "execution_time": 0.018870115280151367, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__user_user_id.ac0ab26d65"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:50.651458Z", "completed_at": "2023-10-30T18:30:50.655011Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:50.657206Z", "completed_at": "2023-10-30T18:30:50.657210Z"}], "thread_id": "Thread-3 (worker)", "execution_time": 0.018988847732543945, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__user_user_id.9a29b41152"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:50.641227Z", "completed_at": "2023-10-30T18:30:50.655277Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:50.657512Z", "completed_at": "2023-10-30T18:30:50.657516Z"}], "thread_id": "Thread-2 (worker)", "execution_time": 0.02084183692932129, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__user_role_user_role_id.949036e9bd"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2023-10-30T18:30:50.645536Z", "completed_at": "2023-10-30T18:30:50.655584Z"}, {"name": "execute", "started_at": "2023-10-30T18:30:50.657802Z", "completed_at": "2023-10-30T18:30:50.657805Z"}], "thread_id": "Thread-4 (worker)", "execution_time": 0.020869016647338867, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__user_role_user_role_id.1259050718"}], "elapsed_time": 5.65877103805542, "args": {"populate_cache": true, "exclude": [], "log_format_file": "debug", "project_dir": "/Users/avinash.kunnath/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "introspect": true, "use_colors_file": true, "log_file_max_bytes": 10485760, "log_level_file": "debug", "log_path": "/Users/avinash.kunnath/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests/logs", "vars": {}, "partial_parse_file_diff": true, "compile": true, "print": true, "send_anonymous_usage_stats": true, "use_colors": true, "log_format": "default", "enable_legacy_logger": false, "log_level": "info", "static_parser": true, "which": "generate", "defer": false, "cache_selected_only": false, "partial_parse": true, "warn_error_options": {"include": [], "exclude": []}, "empty_catalog": false, "indirect_selection": "eager", "strict_mode": false, "quiet": false, "macro_debugging": false, "profiles_dir": "/Users/avinash.kunnath/.dbt", "target": "postgres", "select": [], "favor_state": false, "version_check": true, "write_json": true, "printer_width": 80, "invocation_command": "dbt docs generate -t postgres"}} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/run-results/v6.json", "dbt_version": "1.8.3", "generated_at": "2024-07-10T01:17:30.847741Z", "invocation_id": "5cb841b5-e5cf-490f-8f23-4c9cf5d27c80", "env": {}}, "results": [{"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:28.964446Z", "completed_at": "2024-07-10T01:17:29.862639Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:29.863117Z", "completed_at": "2024-07-10T01:17:29.863134Z"}], "thread_id": "Thread-6", "execution_time": 1.0751209259033203, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__opportunity_line_item", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__opportunity_line_item_enabled variable within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n created_by_id\n \n as \n \n created_by_id\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n discount\n \n as \n \n discount\n \n, \n \n \n has_quantity_schedule\n \n as \n \n has_quantity_schedule\n \n, \n \n \n has_revenue_schedule\n \n as \n \n has_revenue_schedule\n \n, \n \n \n has_schedule\n \n as \n \n has_schedule\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n list_price\n \n as \n \n list_price\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n opportunity_id\n \n as \n \n opportunity_id\n \n, \n \n \n pricebook_entry_id\n \n as \n \n pricebook_entry_id\n \n, \n \n \n product_2_id\n \n as \n \n product_2_id\n \n, \n \n \n product_code\n \n as \n \n product_code\n \n, \n \n \n quantity\n \n as \n \n quantity\n \n, \n \n \n service_date\n \n as \n \n service_date\n \n, \n \n \n sort_order\n \n as \n \n sort_order\n \n, \n \n \n total_price\n \n as \n \n total_price\n \n, \n \n \n unit_price\n \n as \n \n unit_price\n \n, \n cast(null as TEXT) as \n \n CreatedById\n \n , \n cast(null as timestamp) as \n \n CreatedDate\n \n , \n cast(null as boolean) as \n \n HasQuantitySchedule\n \n , \n cast(null as boolean) as \n \n HasRevenueSchedule\n \n , \n cast(null as boolean) as \n \n HasSchedule\n \n , \n cast(null as boolean) as \n \n IsDeleted\n \n , \n cast(null as TEXT) as \n \n LastModifiedById\n \n , \n cast(null as timestamp) as \n \n LastModifiedDate\n \n , \n cast(null as timestamp) as \n \n LastReferencedDate\n \n , \n cast(null as timestamp) as \n \n LastViewedDate\n \n , \n cast(null as float) as \n \n ListPrice\n \n , \n cast(null as TEXT) as \n \n OpportunityId\n \n , \n cast(null as TEXT) as \n \n PricebookEntryId\n \n , \n cast(null as TEXT) as \n \n Product2Id\n \n , \n cast(null as TEXT) as \n \n ProductCode\n \n , \n cast(null as timestamp) as \n \n ServiceDate\n \n , \n cast(null as integer) as \n \n SortOrder\n \n , \n cast(null as float) as \n \n TotalPrice\n \n , \n cast(null as float) as \n \n UnitPrice\n \n \n\n\n \n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_opportunity_line_item_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n cast(Id as TEXT) as opportunity_line_item_id,\n \n\n\n coalesce(cast(CreatedById as TEXT),\n cast(created_by_id as TEXT))\n as created_by_id,\n \n\n\n coalesce(cast(CreatedDate as timestamp),\n cast(created_date as timestamp))\n as created_date,\n \n\n\n cast(Description as TEXT) as opportunity_line_item_description,\n \n\n\n cast(Discount as float) as discount,\n \n\n\n coalesce(cast(HasQuantitySchedule as boolean),\n cast(has_quantity_schedule as boolean))\n as has_quantity_schedule,\n \n\n\n coalesce(cast(HasRevenueSchedule as boolean),\n cast(has_revenue_schedule as boolean))\n as has_revenue_schedule,\n \n\n\n coalesce(cast(HasSchedule as boolean),\n cast(has_schedule as boolean))\n as has_schedule,\n \n\n\n coalesce(cast(IsDeleted as boolean),\n cast(is_deleted as boolean))\n as is_deleted,\n \n\n\n coalesce(cast(LastModifiedById as TEXT),\n cast(last_modified_by_id as TEXT))\n as last_modified_by_id,\n \n\n\n coalesce(cast(LastModifiedDate as timestamp),\n cast(last_modified_date as timestamp))\n as last_modified_date,\n \n\n\n coalesce(cast(LastReferencedDate as timestamp),\n cast(last_referenced_date as timestamp))\n as last_referenced_date,\n \n\n\n coalesce(cast(LastViewedDate as timestamp),\n cast(last_viewed_date as timestamp))\n as last_viewed_date,\n \n\n\n coalesce(cast(ListPrice as numeric(28,6)),\n cast(list_price as numeric(28,6)))\n as list_price,\n \n\n\n cast(Name as TEXT) as opportunity_line_item_name,\n \n\n\n coalesce(cast(OpportunityId as TEXT),\n cast(opportunity_id as TEXT))\n as opportunity_id,\n \n\n\n coalesce(cast(PricebookEntryId as TEXT),\n cast(pricebook_entry_id as TEXT))\n as pricebook_entry_id,\n \n\n\n coalesce(cast(Product2Id as TEXT),\n cast(product_2_id as TEXT))\n as product_2_id,\n \n\n\n coalesce(cast(ProductCode as TEXT),\n cast(product_code as TEXT))\n as product_code,\n \n\n\n cast(Quantity as float) as quantity,\n \n\n\n coalesce(cast(ServiceDate as timestamp),\n cast(service_date as timestamp))\n as service_date,\n \n\n\n coalesce(cast(SortOrder as integer),\n cast(sort_order as integer))\n as sort_order,\n \n\n\n coalesce(cast(TotalPrice as numeric(28,6)),\n cast(total_price as numeric(28,6)))\n as total_price,\n \n\n\n coalesce(cast(UnitPrice as numeric(28,6)),\n cast(unit_price as numeric(28,6)))\n as unit_price\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__opportunity_line_item\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:28.922980Z", "completed_at": "2024-07-10T01:17:29.946075Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:29.956441Z", "completed_at": "2024-07-10T01:17:29.956445Z"}], "thread_id": "Thread-3", "execution_time": 1.151134967803955, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__event", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__event_enabled variable within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n account_id\n \n as \n \n account_id\n \n, \n \n \n activity_date\n \n as \n \n activity_date\n \n, \n \n \n activity_date_time\n \n as \n \n activity_date_time\n \n, \n \n \n created_by_id\n \n as \n \n created_by_id\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n end_date\n \n as \n \n end_date\n \n, \n \n \n end_date_time\n \n as \n \n end_date_time\n \n, \n \n \n event_subtype\n \n as \n \n event_subtype\n \n, \n \n \n group_event_type\n \n as \n \n group_event_type\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_archived\n \n as \n \n is_archived\n \n, \n \n \n is_child\n \n as \n \n is_child\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n is_group_event\n \n as \n \n is_group_event\n \n, \n \n \n is_recurrence\n \n as \n \n is_recurrence\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n location\n \n as \n \n location\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n start_date_time\n \n as \n \n start_date_time\n \n, \n \n \n subject\n \n as \n \n subject\n \n, \n \n \n type\n \n as \n \n type\n \n, \n \n \n what_count\n \n as \n \n what_count\n \n, \n \n \n what_id\n \n as \n \n what_id\n \n, \n \n \n who_count\n \n as \n \n who_count\n \n, \n \n \n who_id\n \n as \n \n who_id\n \n, \n cast(null as TEXT) as \n \n AccountId\n \n , \n cast(null as timestamp) as \n \n ActivityDate\n \n , \n cast(null as timestamp) as \n \n ActivityDateTime\n \n , \n cast(null as TEXT) as \n \n CreatedById\n \n , \n cast(null as timestamp) as \n \n CreatedDate\n \n , \n cast(null as timestamp) as \n \n EndDate\n \n , \n cast(null as timestamp) as \n \n EndDateTime\n \n , \n cast(null as TEXT) as \n \n EventSubtype\n \n , \n cast(null as TEXT) as \n \n GroupEventType\n \n , \n cast(null as boolean) as \n \n IsArchived\n \n , \n cast(null as boolean) as \n \n IsChild\n \n , \n cast(null as boolean) as \n \n IsDeleted\n \n , \n cast(null as boolean) as \n \n IsGroupEvent\n \n , \n cast(null as boolean) as \n \n IsRecurrence\n \n , \n cast(null as TEXT) as \n \n LastModifiedById\n \n , \n cast(null as timestamp) as \n \n LastModifiedDate\n \n , \n cast(null as TEXT) as \n \n OwnerId\n \n , \n cast(null as timestamp) as \n \n StartDateTime\n \n , \n cast(null as integer) as \n \n WhatCount\n \n , \n cast(null as TEXT) as \n \n WhatId\n \n , \n cast(null as integer) as \n \n WhoCount\n \n , \n cast(null as TEXT) as \n \n WhoId\n \n \n\n\n\n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_event_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n cast(Id as TEXT) as event_id,\n \n\n\n coalesce(cast(AccountId as TEXT),\n cast(account_id as TEXT))\n as account_id,\n \n\n\n coalesce(cast(ActivityDate as timestamp),\n cast(activity_date as timestamp))\n as activity_date,\n \n\n\n coalesce(cast(ActivityDateTime as timestamp),\n cast(activity_date_time as timestamp))\n as activity_date_time,\n \n\n\n coalesce(cast(CreatedById as TEXT),\n cast(created_by_id as TEXT))\n as created_by_id,\n \n\n\n coalesce(cast(CreatedDate as timestamp),\n cast(created_date as timestamp))\n as created_date,\n \n\n\n cast(Description as TEXT) as event_description,\n \n\n\n coalesce(cast(EndDate as timestamp),\n cast(end_date as timestamp))\n as end_date,\n \n\n\n coalesce(cast(EndDateTime as timestamp),\n cast(end_date_time as timestamp))\n as end_date_time,\n \n\n\n coalesce(cast(EventSubtype as TEXT),\n cast(event_subtype as TEXT))\n as event_subtype,\n \n\n\n coalesce(cast(GroupEventType as TEXT),\n cast(group_event_type as TEXT))\n as group_event_type,\n \n\n\n coalesce(cast(IsArchived as boolean),\n cast(is_archived as boolean))\n as is_archived,\n \n\n\n coalesce(cast(IsChild as boolean),\n cast(is_child as boolean))\n as is_child,\n \n\n\n coalesce(cast(IsDeleted as boolean),\n cast(is_deleted as boolean))\n as is_deleted,\n \n\n\n coalesce(cast(IsGroupEvent as boolean),\n cast(is_group_event as boolean))\n as is_group_event,\n \n\n\n coalesce(cast(IsRecurrence as boolean),\n cast(is_recurrence as boolean))\n as is_recurrence,\n \n\n\n coalesce(cast(LastModifiedById as TEXT),\n cast(last_modified_by_id as TEXT))\n as last_modified_by_id,\n \n\n\n coalesce(cast(LastModifiedDate as timestamp),\n cast(last_modified_date as timestamp))\n as last_modified_date,\n \n\n\n cast(Location as TEXT) as location,\n \n\n\n coalesce(cast(OwnerId as TEXT),\n cast(owner_id as TEXT))\n as owner_id,\n \n\n\n coalesce(cast(StartDateTime as timestamp),\n cast(start_date_time as timestamp))\n as start_date_time,\n \n\n\n cast(Subject as TEXT) as subject,\n \n\n\n cast(Type as TEXT) as type,\n \n\n\n coalesce(cast(WhatCount as integer),\n cast(what_count as integer))\n as what_count,\n \n\n\n coalesce(cast(WhatId as TEXT),\n cast(what_id as TEXT))\n as what_id,\n \n\n\n coalesce(cast(WhoCount as integer),\n cast(who_count as integer))\n as who_count,\n \n\n\n coalesce(cast(WhoId as TEXT),\n cast(who_id as TEXT))\n as who_id\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__event\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:28.976674Z", "completed_at": "2024-07-10T01:17:29.944563Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:29.945834Z", "completed_at": "2024-07-10T01:17:29.945838Z"}], "thread_id": "Thread-7", "execution_time": 1.1498148441314697, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__order", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__order_enabled within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n account_id\n \n as \n \n account_id\n \n, \n \n \n activated_by_id\n \n as \n \n activated_by_id\n \n, \n \n \n activated_date\n \n as \n \n activated_date\n \n, \n \n \n billing_city\n \n as \n \n billing_city\n \n, \n \n \n billing_country\n \n as \n \n billing_country\n \n, \n \n \n billing_country_code\n \n as \n \n billing_country_code\n \n, \n \n \n billing_postal_code\n \n as \n \n billing_postal_code\n \n, \n \n \n billing_state\n \n as \n \n billing_state\n \n, \n \n \n billing_state_code\n \n as \n \n billing_state_code\n \n, \n \n \n billing_street\n \n as \n \n billing_street\n \n, \n \n \n contract_id\n \n as \n \n contract_id\n \n, \n \n \n created_by_id\n \n as \n \n created_by_id\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n end_date\n \n as \n \n end_date\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n opportunity_id\n \n as \n \n opportunity_id\n \n, \n \n \n order_number\n \n as \n \n order_number\n \n, \n \n \n original_order_id\n \n as \n \n original_order_id\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n pricebook_2_id\n \n as \n \n pricebook_2_id\n \n, \n \n \n shipping_city\n \n as \n \n shipping_city\n \n, \n \n \n shipping_country\n \n as \n \n shipping_country\n \n, \n \n \n shipping_country_code\n \n as \n \n shipping_country_code\n \n, \n \n \n shipping_postal_code\n \n as \n \n shipping_postal_code\n \n, \n \n \n shipping_state\n \n as \n \n shipping_state\n \n, \n \n \n shipping_state_code\n \n as \n \n shipping_state_code\n \n, \n \n \n shipping_street\n \n as \n \n shipping_street\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n total_amount\n \n as \n \n total_amount\n \n, \n \n \n type\n \n as \n \n type\n \n, \n cast(null as TEXT) as \n \n AccountId\n \n , \n cast(null as TEXT) as \n \n ActivatedById\n \n , \n cast(null as timestamp) as \n \n ActivatedDate\n \n , \n cast(null as TEXT) as \n \n BillingCity\n \n , \n cast(null as TEXT) as \n \n BillingCountry\n \n , \n cast(null as TEXT) as \n \n BillingCountryCode\n \n , \n cast(null as TEXT) as \n \n BillingPostalCode\n \n , \n cast(null as TEXT) as \n \n BillingState\n \n , \n cast(null as TEXT) as \n \n BillingStateCode\n \n , \n cast(null as TEXT) as \n \n BillingStreet\n \n , \n cast(null as TEXT) as \n \n ContractId\n \n , \n cast(null as TEXT) as \n \n CreatedById\n \n , \n cast(null as timestamp) as \n \n CreatedDate\n \n , \n cast(null as timestamp) as \n \n EndDate\n \n , \n cast(null as boolean) as \n \n IsDeleted\n \n , \n cast(null as TEXT) as \n \n LastModifiedById\n \n , \n cast(null as timestamp) as \n \n LastModifiedDate\n \n , \n cast(null as timestamp) as \n \n LastReferencedDate\n \n , \n cast(null as timestamp) as \n \n LastViewedDate\n \n , \n cast(null as TEXT) as \n \n OpportunityId\n \n , \n cast(null as TEXT) as \n \n OrderNumber\n \n , \n cast(null as TEXT) as \n \n OriginalOrderId\n \n , \n cast(null as TEXT) as \n \n OwnerId\n \n , \n cast(null as TEXT) as \n \n Pricebook2Id\n \n , \n cast(null as TEXT) as \n \n ShippingCity\n \n , \n cast(null as TEXT) as \n \n ShippingCountry\n \n , \n cast(null as TEXT) as \n \n ShippingCountryCode\n \n , \n cast(null as TEXT) as \n \n ShippingPostalCode\n \n , \n cast(null as TEXT) as \n \n ShippingState\n \n , \n cast(null as TEXT) as \n \n ShippingStateCode\n \n , \n cast(null as TEXT) as \n \n ShippingStreet\n \n , \n cast(null as float) as \n \n TotalAmount\n \n \n\n\n \n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_order_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n cast(Id as TEXT) as order_id,\n \n\n\n coalesce(cast(AccountId as TEXT),\n cast(account_id as TEXT))\n as account_id,\n \n\n\n coalesce(cast(ActivatedById as TEXT),\n cast(activated_by_id as TEXT))\n as activated_by_id,\n \n\n\n coalesce(cast(ActivatedDate as timestamp),\n cast(activated_date as timestamp))\n as activated_date,\n \n\n\n coalesce(cast(BillingCity as TEXT),\n cast(billing_city as TEXT))\n as billing_city,\n \n\n\n coalesce(cast(BillingCountry as TEXT),\n cast(billing_country as TEXT))\n as billing_country,\n \n\n\n coalesce(cast(BillingCountryCode as TEXT),\n cast(billing_country_code as TEXT))\n as billing_country_code,\n \n\n\n coalesce(cast(BillingPostalCode as TEXT),\n cast(billing_postal_code as TEXT))\n as billing_postal_code,\n \n\n\n coalesce(cast(BillingState as TEXT),\n cast(billing_state as TEXT))\n as billing_state,\n \n\n\n coalesce(cast(BillingStateCode as TEXT),\n cast(billing_state_code as TEXT))\n as billing_state_code,\n \n\n\n coalesce(cast(BillingStreet as TEXT),\n cast(billing_street as TEXT))\n as billing_street,\n \n\n\n coalesce(cast(ContractId as TEXT),\n cast(contract_id as TEXT))\n as contract_id,\n \n\n\n coalesce(cast(CreatedById as TEXT),\n cast(created_by_id as TEXT))\n as created_by_id,\n \n\n\n coalesce(cast(CreatedDate as timestamp),\n cast(created_date as timestamp))\n as created_date,\n \n\n\n cast(Description as TEXT) as order_description,\n \n\n\n coalesce(cast(EndDate as timestamp),\n cast(end_date as timestamp))\n as end_date,\n \n\n\n coalesce(cast(IsDeleted as boolean),\n cast(is_deleted as boolean))\n as is_deleted,\n \n\n\n coalesce(cast(LastModifiedById as TEXT),\n cast(last_modified_by_id as TEXT))\n as last_modified_by_id,\n \n\n\n coalesce(cast(LastModifiedDate as timestamp),\n cast(last_modified_date as timestamp))\n as last_modified_date,\n \n\n\n coalesce(cast(LastReferencedDate as timestamp),\n cast(last_referenced_date as timestamp))\n as last_referenced_date,\n \n\n\n coalesce(cast(LastViewedDate as timestamp),\n cast(last_viewed_date as timestamp))\n as last_viewed_date,\n \n\n\n coalesce(cast(OpportunityId as TEXT),\n cast(opportunity_id as TEXT))\n as opportunity_id,\n \n\n\n coalesce(cast(OrderNumber as TEXT),\n cast(order_number as TEXT))\n as order_number,\n \n\n\n coalesce(cast(OriginalOrderId as TEXT),\n cast(original_order_id as TEXT))\n as original_order_id,\n \n\n\n coalesce(cast(OwnerId as TEXT),\n cast(owner_id as TEXT))\n as owner_id,\n \n\n\n coalesce(cast(Pricebook2Id as TEXT),\n cast(pricebook_2_id as TEXT))\n as pricebook_2_id,\n \n\n\n coalesce(cast(ShippingCity as TEXT),\n cast(shipping_city as TEXT))\n as shipping_city,\n \n\n\n coalesce(cast(ShippingCountry as TEXT),\n cast(shipping_country as TEXT))\n as shipping_country,\n \n\n\n coalesce(cast(ShippingCountryCode as TEXT),\n cast(shipping_country_code as TEXT))\n as shipping_country_code,\n \n\n\n coalesce(cast(ShippingPostalCode as TEXT),\n cast(shipping_postal_code as TEXT))\n as shipping_postal_code,\n \n\n\n coalesce(cast(ShippingState as TEXT),\n cast(shipping_state as TEXT))\n as shipping_state,\n \n\n\n coalesce(cast(ShippingStateCode as TEXT),\n cast(shipping_state_code as TEXT))\n as shipping_state_code,\n \n\n\n coalesce(cast(ShippingStreet as TEXT),\n cast(shipping_street as TEXT))\n as shipping_street,\n \n\n\n cast(Status as TEXT) as status,\n \n\n\n coalesce(cast(TotalAmount as numeric(28,6)),\n cast(total_amount as numeric(28,6)))\n as total_amount,\n \n\n\n cast(Type as TEXT) as type\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__order\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:28.934466Z", "completed_at": "2024-07-10T01:17:29.955232Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:29.956912Z", "completed_at": "2024-07-10T01:17:29.956916Z"}], "thread_id": "Thread-4", "execution_time": 1.1517131328582764, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__lead", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__lead_enabled within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n annual_revenue\n \n as \n \n annual_revenue\n \n, \n \n \n city\n \n as \n \n city\n \n, \n \n \n company\n \n as \n \n company\n \n, \n \n \n converted_account_id\n \n as \n \n converted_account_id\n \n, \n \n \n converted_contact_id\n \n as \n \n converted_contact_id\n \n, \n \n \n converted_date\n \n as \n \n converted_date\n \n, \n \n \n converted_opportunity_id\n \n as \n \n converted_opportunity_id\n \n, \n \n \n country\n \n as \n \n country\n \n, \n \n \n country_code\n \n as \n \n country_code\n \n, \n \n \n created_by_id\n \n as \n \n created_by_id\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n email\n \n as \n \n email\n \n, \n \n \n email_bounced_date\n \n as \n \n email_bounced_date\n \n, \n \n \n email_bounced_reason\n \n as \n \n email_bounced_reason\n \n, \n \n \n first_name\n \n as \n \n first_name\n \n, \n \n \n has_opted_out_of_email\n \n as \n \n has_opted_out_of_email\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n individual_id\n \n as \n \n individual_id\n \n, \n \n \n industry\n \n as \n \n industry\n \n, \n \n \n is_converted\n \n as \n \n is_converted\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n is_unread_by_owner\n \n as \n \n is_unread_by_owner\n \n, \n \n \n last_activity_date\n \n as \n \n last_activity_date\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n last_name\n \n as \n \n last_name\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n lead_source\n \n as \n \n lead_source\n \n, \n \n \n master_record_id\n \n as \n \n master_record_id\n \n, \n \n \n mobile_phone\n \n as \n \n mobile_phone\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n number_of_employees\n \n as \n \n number_of_employees\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n phone\n \n as \n \n phone\n \n, \n \n \n postal_code\n \n as \n \n postal_code\n \n, \n \n \n state\n \n as \n \n state\n \n, \n \n \n state_code\n \n as \n \n state_code\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n street\n \n as \n \n street\n \n, \n \n \n title\n \n as \n \n title\n \n, \n \n \n website\n \n as \n \n website\n \n, \n cast(null as float) as \n \n AnnualRevenue\n \n , \n cast(null as TEXT) as \n \n ConvertedAccountId\n \n , \n cast(null as TEXT) as \n \n ConvertedContactId\n \n , \n cast(null as timestamp) as \n \n ConvertedDate\n \n , \n cast(null as TEXT) as \n \n ConvertedOpportunityId\n \n , \n cast(null as TEXT) as \n \n CountryCode\n \n , \n cast(null as TEXT) as \n \n CreatedById\n \n , \n cast(null as timestamp) as \n \n CreatedDate\n \n , \n cast(null as timestamp) as \n \n EmailBouncedDate\n \n , \n cast(null as TEXT) as \n \n EmailBouncedReason\n \n , \n cast(null as TEXT) as \n \n FirstName\n \n , \n cast(null as boolean) as \n \n HasOptedOutOfEmail\n \n , \n cast(null as TEXT) as \n \n IndividualId\n \n , \n cast(null as boolean) as \n \n IsConverted\n \n , \n cast(null as boolean) as \n \n IsDeleted\n \n , \n cast(null as boolean) as \n \n IsUnreadByOwner\n \n , \n cast(null as timestamp) as \n \n LastActivityDate\n \n , \n cast(null as TEXT) as \n \n LastModifiedById\n \n , \n cast(null as timestamp) as \n \n LastModifiedDate\n \n , \n cast(null as TEXT) as \n \n LastName\n \n , \n cast(null as timestamp) as \n \n LastReferencedDate\n \n , \n cast(null as timestamp) as \n \n LastViewedDate\n \n , \n cast(null as TEXT) as \n \n LeadSource\n \n , \n cast(null as TEXT) as \n \n MasterRecordId\n \n , \n cast(null as TEXT) as \n \n MobilePhone\n \n , \n cast(null as integer) as \n \n NumberOfEmployees\n \n , \n cast(null as TEXT) as \n \n OwnerId\n \n , \n cast(null as TEXT) as \n \n PostalCode\n \n , \n cast(null as TEXT) as \n \n StateCode\n \n \n\n\n \n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_lead_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n cast(Id as TEXT) as lead_id,\n \n\n\n coalesce(cast(AnnualRevenue as numeric(28,6)),\n cast(annual_revenue as numeric(28,6)))\n as annual_revenue,\n \n\n\n cast(City as TEXT) as city,\n \n\n\n cast(Company as TEXT) as company,\n \n\n\n coalesce(cast(ConvertedAccountId as TEXT),\n cast(converted_account_id as TEXT))\n as converted_account_id,\n \n\n\n coalesce(cast(ConvertedContactId as TEXT),\n cast(converted_contact_id as TEXT))\n as converted_contact_id,\n \n\n\n coalesce(cast(ConvertedDate as timestamp),\n cast(converted_date as timestamp))\n as converted_date,\n \n\n\n coalesce(cast(ConvertedOpportunityId as TEXT),\n cast(converted_opportunity_id as TEXT))\n as converted_opportunity_id,\n \n\n\n cast(Country as TEXT) as country,\n \n\n\n coalesce(cast(CountryCode as TEXT),\n cast(country_code as TEXT))\n as country_code,\n \n\n\n coalesce(cast(CreatedById as TEXT),\n cast(created_by_id as TEXT))\n as created_by_id,\n \n\n\n coalesce(cast(CreatedDate as timestamp),\n cast(created_date as timestamp))\n as created_date,\n \n\n\n cast(Description as TEXT) as lead_description,\n \n\n\n cast(Email as TEXT) as email,\n \n\n\n coalesce(cast(EmailBouncedDate as timestamp),\n cast(email_bounced_date as timestamp))\n as email_bounced_date,\n \n\n\n coalesce(cast(EmailBouncedReason as TEXT),\n cast(email_bounced_reason as TEXT))\n as email_bounced_reason,\n \n\n\n coalesce(cast(FirstName as TEXT),\n cast(first_name as TEXT))\n as first_name,\n \n\n\n coalesce(cast(HasOptedOutOfEmail as boolean),\n cast(has_opted_out_of_email as boolean))\n as has_opted_out_of_email,\n \n\n\n coalesce(cast(IndividualId as TEXT),\n cast(individual_id as TEXT))\n as individual_id,\n \n\n\n cast(Industry as TEXT) as industry,\n \n\n\n coalesce(cast(IsConverted as boolean),\n cast(is_converted as boolean))\n as is_converted,\n \n\n\n coalesce(cast(IsDeleted as boolean),\n cast(is_deleted as boolean))\n as is_deleted,\n \n\n\n coalesce(cast(IsUnreadByOwner as boolean),\n cast(is_unread_by_owner as boolean))\n as is_unread_by_owner,\n \n\n\n coalesce(cast(LastActivityDate as timestamp),\n cast(last_activity_date as timestamp))\n as last_activity_date,\n \n\n\n coalesce(cast(LastModifiedById as TEXT),\n cast(last_modified_by_id as TEXT))\n as last_modified_by_id,\n \n\n\n coalesce(cast(LastModifiedDate as timestamp),\n cast(last_modified_date as timestamp))\n as last_modified_date,\n \n\n\n coalesce(cast(LastName as TEXT),\n cast(last_name as TEXT))\n as last_name,\n \n\n\n coalesce(cast(LastReferencedDate as timestamp),\n cast(last_referenced_date as timestamp))\n as last_referenced_date,\n \n\n\n coalesce(cast(LastViewedDate as timestamp),\n cast(last_viewed_date as timestamp))\n as last_viewed_date,\n \n\n\n coalesce(cast(LeadSource as TEXT),\n cast(lead_source as TEXT))\n as lead_source,\n \n\n\n coalesce(cast(MasterRecordId as TEXT),\n cast(master_record_id as TEXT))\n as master_record_id,\n \n\n\n coalesce(cast(MobilePhone as TEXT),\n cast(mobile_phone as TEXT))\n as mobile_phone,\n \n\n\n cast(Name as TEXT) as lead_name,\n \n\n\n coalesce(cast(NumberOfEmployees as integer),\n cast(number_of_employees as integer))\n as number_of_employees,\n \n\n\n coalesce(cast(OwnerId as TEXT),\n cast(owner_id as TEXT))\n as owner_id,\n \n\n\n cast(Phone as TEXT) as phone,\n \n\n\n coalesce(cast(PostalCode as TEXT),\n cast(postal_code as TEXT))\n as postal_code,\n \n\n\n cast(State as TEXT) as state,\n \n\n\n coalesce(cast(StateCode as TEXT),\n cast(state_code as TEXT))\n as state_code,\n \n\n\n cast(Status as TEXT) as status,\n \n\n\n cast(Street as TEXT) as street,\n \n\n\n cast(Title as TEXT) as title,\n \n\n\n cast(Website as TEXT) as website\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__lead\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:28.940784Z", "completed_at": "2024-07-10T01:17:29.955035Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:29.956696Z", "completed_at": "2024-07-10T01:17:29.956699Z"}], "thread_id": "Thread-5", "execution_time": 1.1513910293579102, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__opportunity", "compiled": true, "compiled_code": "with fields as (\n\n select\n\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n account_id\n \n as \n \n account_id\n \n, \n \n \n amount\n \n as \n \n amount\n \n, \n \n \n campaign_id\n \n as \n \n campaign_id\n \n, \n \n \n close_date\n \n as \n \n close_date\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n expected_revenue\n \n as \n \n expected_revenue\n \n, \n \n \n fiscal\n \n as \n \n fiscal\n \n, \n \n \n fiscal_quarter\n \n as \n \n fiscal_quarter\n \n, \n \n \n fiscal_year\n \n as \n \n fiscal_year\n \n, \n \n \n forecast_category\n \n as \n \n forecast_category\n \n, \n \n \n forecast_category_name\n \n as \n \n forecast_category_name\n \n, \n \n \n has_open_activity\n \n as \n \n has_open_activity\n \n, \n \n \n has_opportunity_line_item\n \n as \n \n has_opportunity_line_item\n \n, \n \n \n has_overdue_task\n \n as \n \n has_overdue_task\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_closed\n \n as \n \n is_closed\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n is_won\n \n as \n \n is_won\n \n, \n \n \n last_activity_date\n \n as \n \n last_activity_date\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n lead_source\n \n as \n \n lead_source\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n next_step\n \n as \n \n next_step\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n probability\n \n as \n \n probability\n \n, \n \n \n record_type_id\n \n as \n \n record_type_id\n \n, \n \n \n stage_name\n \n as \n \n stage_name\n \n, \n \n \n synced_quote_id\n \n as \n \n synced_quote_id\n \n, \n \n \n type\n \n as \n \n type\n \n, \n cast(null as TEXT) as \n \n AccountId\n \n , \n cast(null as TEXT) as \n \n CampaignId\n \n , \n cast(null as timestamp) as \n \n CloseDate\n \n , \n cast(null as timestamp) as \n \n CreatedDate\n \n , \n cast(null as numeric(28,6)) as \n \n ExpectedRevenue\n \n , \n cast(null as integer) as \n \n FiscalQuarter\n \n , \n cast(null as integer) as \n \n FiscalYear\n \n , \n cast(null as TEXT) as \n \n ForecastCategory\n \n , \n cast(null as TEXT) as \n \n ForecastCategoryName\n \n , \n cast(null as boolean) as \n \n HasOpenActivity\n \n , \n cast(null as boolean) as \n \n HasOpportunityLineItem\n \n , \n cast(null as boolean) as \n \n HasOverdueTask\n \n , \n cast(null as boolean) as \n \n IsClosed\n \n , \n cast(null as boolean) as \n \n IsDeleted\n \n , \n cast(null as boolean) as \n \n IsWon\n \n , \n cast(null as timestamp) as \n \n LastActivityDate\n \n , \n cast(null as timestamp) as \n \n LastReferencedDate\n \n , \n cast(null as timestamp) as \n \n LastViewedDate\n \n , \n cast(null as TEXT) as \n \n LeadSource\n \n , \n cast(null as TEXT) as \n \n NextStep\n \n , \n cast(null as TEXT) as \n \n OwnerId\n \n , \n cast(null as TEXT) as \n \n RecordTypeId\n \n , \n cast(null as TEXT) as \n \n StageName\n \n , \n cast(null as TEXT) as \n \n SyncedQuoteId\n \n \n\n\n\n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_opportunity_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n coalesce(cast(AccountId as TEXT),\n cast(account_id as TEXT))\n as account_id,\n \n\n\n cast(Amount as numeric(28,6)) as amount,\n \n\n\n coalesce(cast(CampaignId as TEXT),\n cast(campaign_id as TEXT))\n as campaign_id,\n \n\n\n coalesce(cast(CloseDate as timestamp),\n cast(close_date as timestamp))\n as close_date,\n \n\n\n coalesce(cast(CreatedDate as timestamp),\n cast(created_date as timestamp))\n as created_date,\n \n\n\n cast(Description as TEXT) as opportunity_description,\n \n\n\n coalesce(cast(ExpectedRevenue as numeric(28,6)),\n cast(expected_revenue as numeric(28,6)))\n as expected_revenue,\n \n\n\n cast(Fiscal as TEXT) as fiscal,\n \n\n\n coalesce(cast(FiscalQuarter as integer),\n cast(fiscal_quarter as integer))\n as fiscal_quarter,\n \n\n\n coalesce(cast(FiscalYear as integer),\n cast(fiscal_year as integer))\n as fiscal_year,\n \n\n\n coalesce(cast(ForecastCategory as TEXT),\n cast(forecast_category as TEXT))\n as forecast_category,\n \n\n\n coalesce(cast(ForecastCategoryName as TEXT),\n cast(forecast_category_name as TEXT))\n as forecast_category_name,\n \n\n\n coalesce(cast(HasOpenActivity as boolean),\n cast(has_open_activity as boolean))\n as has_open_activity,\n \n\n\n coalesce(cast(HasOpportunityLineItem as boolean),\n cast(has_opportunity_line_item as boolean))\n as has_opportunity_line_item,\n \n\n\n coalesce(cast(HasOverdueTask as boolean),\n cast(has_overdue_task as boolean))\n as has_overdue_task,\n \n\n\n cast(Id as TEXT) as opportunity_id,\n \n\n\n coalesce(cast(IsClosed as boolean),\n cast(is_closed as boolean))\n as is_closed,\n \n\n\n coalesce(cast(IsDeleted as boolean),\n cast(is_deleted as boolean))\n as is_deleted,\n \n\n\n coalesce(cast(IsWon as boolean),\n cast(is_won as boolean))\n as is_won,\n \n\n\n coalesce(cast(LastActivityDate as timestamp),\n cast(last_activity_date as timestamp))\n as last_activity_date,\n \n\n\n coalesce(cast(LastReferencedDate as timestamp),\n cast(last_referenced_date as timestamp))\n as last_referenced_date,\n \n\n\n coalesce(cast(LastViewedDate as timestamp),\n cast(last_viewed_date as timestamp))\n as last_viewed_date,\n \n\n\n coalesce(cast(LeadSource as TEXT),\n cast(lead_source as TEXT))\n as lead_source,\n \n\n\n cast(Name as TEXT) as opportunity_name,\n \n\n\n coalesce(cast(NextStep as TEXT),\n cast(next_step as TEXT))\n as next_step,\n \n\n\n coalesce(cast(OwnerId as TEXT),\n cast(owner_id as TEXT))\n as owner_id,\n \n\n\n cast(Probability as float) as probability,\n \n\n\n coalesce(cast(RecordTypeId as TEXT),\n cast(record_type_id as TEXT))\n as record_type_id,\n \n\n\n coalesce(cast(StageName as TEXT),\n cast(stage_name as TEXT))\n as stage_name,\n \n\n\n coalesce(cast(SyncedQuoteId as TEXT),\n cast(synced_quote_id as TEXT))\n as synced_quote_id,\n \n\n\n cast(Type as TEXT) as type\n \n \n\n\n\n\n\n from fields\n where coalesce(_fivetran_active, true)\n), \n\ncalculated as (\n \n select \n *,\n created_date >= date_trunc('month', \n current_timestamp::timestamp\n) as is_created_this_month,\n created_date >= date_trunc('quarter', \n current_timestamp::timestamp\n) as is_created_this_quarter,\n \n ((created_date)::date - (\n current_timestamp::timestamp\n)::date)\n as days_since_created,\n \n ((created_date)::date - (close_date)::date)\n as days_to_close,\n date_trunc('month', close_date) = date_trunc('month', \n current_timestamp::timestamp\n) as is_closed_this_month,\n date_trunc('quarter', close_date) = date_trunc('quarter', \n current_timestamp::timestamp\n) as is_closed_this_quarter\n from final\n)\n\nselect * \nfrom calculated\nwhere not coalesce(is_deleted, false)", "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__opportunity\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:28.983040Z", "completed_at": "2024-07-10T01:17:29.945219Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:29.955588Z", "completed_at": "2024-07-10T01:17:29.955599Z"}], "thread_id": "Thread-8", "execution_time": 1.137213945388794, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__product_2", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__product_2_enabled variable within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n created_by_id\n \n as \n \n created_by_id\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n display_url\n \n as \n \n display_url\n \n, \n \n \n external_id\n \n as \n \n external_id\n \n, \n \n \n family\n \n as \n \n family\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_active\n \n as \n \n is_active\n \n, \n \n \n is_archived\n \n as \n \n is_archived\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n number_of_quantity_installments\n \n as \n \n number_of_quantity_installments\n \n, \n \n \n number_of_revenue_installments\n \n as \n \n number_of_revenue_installments\n \n, \n \n \n product_code\n \n as \n \n product_code\n \n, \n \n \n quantity_installment_period\n \n as \n \n quantity_installment_period\n \n, \n \n \n quantity_schedule_type\n \n as \n \n quantity_schedule_type\n \n, \n \n \n quantity_unit_of_measure\n \n as \n \n quantity_unit_of_measure\n \n, \n \n \n record_type_id\n \n as \n \n record_type_id\n \n, \n \n \n revenue_installment_period\n \n as \n \n revenue_installment_period\n \n, \n \n \n revenue_schedule_type\n \n as \n \n revenue_schedule_type\n \n, \n cast(null as TEXT) as \n \n CreatedById\n \n , \n cast(null as timestamp) as \n \n CreatedDate\n \n , \n cast(null as TEXT) as \n \n DisplayUrl\n \n , \n cast(null as TEXT) as \n \n ExternalId\n \n , \n cast(null as boolean) as \n \n IsActive\n \n , \n cast(null as boolean) as \n \n IsArchived\n \n , \n cast(null as boolean) as \n \n IsDeleted\n \n , \n cast(null as TEXT) as \n \n LastModifiedById\n \n , \n cast(null as timestamp) as \n \n LastModifiedDate\n \n , \n cast(null as timestamp) as \n \n LastReferencedDate\n \n , \n cast(null as timestamp) as \n \n LastViewedDate\n \n , \n cast(null as integer) as \n \n NumberOfQuantityInstallments\n \n , \n cast(null as integer) as \n \n NumberOfRevenueInstallments\n \n , \n cast(null as TEXT) as \n \n ProductCode\n \n , \n cast(null as TEXT) as \n \n QuantityInstallmentPeriod\n \n , \n cast(null as TEXT) as \n \n QuantityScheduleType\n \n , \n cast(null as TEXT) as \n \n QuantityUnitOfMeasure\n \n , \n cast(null as TEXT) as \n \n RecordTypeId\n \n , \n cast(null as TEXT) as \n \n RevenueInstallmentPeriod\n \n , \n cast(null as TEXT) as \n \n RevenueScheduleType\n \n \n\n\n \n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_product_2_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n cast(Id as TEXT) as product_2_id,\n \n\n\n coalesce(cast(CreatedById as TEXT),\n cast(created_by_id as TEXT))\n as created_by_id,\n \n\n\n coalesce(cast(CreatedDate as timestamp),\n cast(created_date as timestamp))\n as created_date,\n \n\n\n cast(Description as TEXT) as product_2_description,\n \n\n\n coalesce(cast(DisplayUrl as TEXT),\n cast(display_url as TEXT))\n as display_url,\n \n\n\n coalesce(cast(ExternalId as TEXT),\n cast(external_id as TEXT))\n as external_id,\n \n\n\n cast(Family as TEXT) as family,\n \n\n\n coalesce(cast(IsActive as boolean),\n cast(is_active as boolean))\n as is_active,\n \n\n\n coalesce(cast(IsArchived as boolean),\n cast(is_archived as boolean))\n as is_archived,\n \n\n\n coalesce(cast(IsDeleted as boolean),\n cast(is_deleted as boolean))\n as is_deleted,\n \n\n\n coalesce(cast(LastModifiedById as TEXT),\n cast(last_modified_by_id as TEXT))\n as last_modified_by_id,\n \n\n\n coalesce(cast(LastModifiedDate as timestamp),\n cast(last_modified_date as timestamp))\n as last_modified_date,\n \n\n\n coalesce(cast(LastReferencedDate as timestamp),\n cast(last_referenced_date as timestamp))\n as last_referenced_date,\n \n\n\n coalesce(cast(LastViewedDate as timestamp),\n cast(last_viewed_date as timestamp))\n as last_viewed_date,\n \n\n\n cast(Name as TEXT) as product_2_name,\n \n\n\n coalesce(cast(NumberOfQuantityInstallments as integer),\n cast(number_of_quantity_installments as integer))\n as number_of_quantity_installments,\n \n\n\n coalesce(cast(NumberOfRevenueInstallments as integer),\n cast(number_of_revenue_installments as integer))\n as number_of_revenue_installments,\n \n\n\n coalesce(cast(ProductCode as TEXT),\n cast(product_code as TEXT))\n as product_code,\n \n\n\n coalesce(cast(QuantityInstallmentPeriod as TEXT),\n cast(quantity_installment_period as TEXT))\n as quantity_installment_period,\n \n\n\n coalesce(cast(QuantityScheduleType as TEXT),\n cast(quantity_schedule_type as TEXT))\n as quantity_schedule_type,\n \n\n\n coalesce(cast(QuantityUnitOfMeasure as TEXT),\n cast(quantity_unit_of_measure as TEXT))\n as quantity_unit_of_measure,\n \n\n\n coalesce(cast(RecordTypeId as TEXT),\n cast(record_type_id as TEXT))\n as record_type_id,\n \n\n\n coalesce(cast(RevenueInstallmentPeriod as TEXT),\n cast(revenue_installment_period as TEXT))\n as revenue_installment_period,\n \n\n\n coalesce(cast(RevenueScheduleType as TEXT),\n cast(revenue_schedule_type as TEXT))\n as revenue_schedule_type\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__product_2\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:28.909579Z", "completed_at": "2024-07-10T01:17:29.957545Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:29.958112Z", "completed_at": "2024-07-10T01:17:29.958115Z"}], "thread_id": "Thread-2", "execution_time": 1.1551978588104248, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__contact", "compiled": true, "compiled_code": "with fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n account_id\n \n as \n \n account_id\n \n, \n \n \n department\n \n as \n \n department\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n email\n \n as \n \n email\n \n, \n \n \n first_name\n \n as \n \n first_name\n \n, \n \n \n home_phone\n \n as \n \n home_phone\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n individual_id\n \n as \n \n individual_id\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n last_activity_date\n \n as \n \n last_activity_date\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n last_name\n \n as \n \n last_name\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n lead_source\n \n as \n \n lead_source\n \n, \n \n \n mailing_city\n \n as \n \n mailing_city\n \n, \n \n \n mailing_country\n \n as \n \n mailing_country\n \n, \n \n \n mailing_country_code\n \n as \n \n mailing_country_code\n \n, \n \n \n mailing_postal_code\n \n as \n \n mailing_postal_code\n \n, \n \n \n mailing_state\n \n as \n \n mailing_state\n \n, \n \n \n mailing_state_code\n \n as \n \n mailing_state_code\n \n, \n \n \n mailing_street\n \n as \n \n mailing_street\n \n, \n \n \n master_record_id\n \n as \n \n master_record_id\n \n, \n \n \n mobile_phone\n \n as \n \n mobile_phone\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n phone\n \n as \n \n phone\n \n, \n \n \n reports_to_id\n \n as \n \n reports_to_id\n \n, \n \n \n title\n \n as \n \n title\n \n, \n cast(null as TEXT) as \n \n AccountId\n \n , \n cast(null as TEXT) as \n \n FirstName\n \n , \n cast(null as TEXT) as \n \n HomePhone\n \n , \n cast(null as TEXT) as \n \n IndividualId\n \n , \n cast(null as boolean) as \n \n IsDeleted\n \n , \n cast(null as timestamp) as \n \n LastActivityDate\n \n , \n cast(null as TEXT) as \n \n LastModifiedById\n \n , \n cast(null as timestamp) as \n \n LastModifiedDate\n \n , \n cast(null as TEXT) as \n \n LastName\n \n , \n cast(null as timestamp) as \n \n LastReferencedDate\n \n , \n cast(null as timestamp) as \n \n LastViewedDate\n \n , \n cast(null as TEXT) as \n \n LeadSource\n \n , \n cast(null as TEXT) as \n \n MailingCity\n \n , \n cast(null as TEXT) as \n \n MailingCountry\n \n , \n cast(null as TEXT) as \n \n MailingCountryCode\n \n , \n cast(null as TEXT) as \n \n MailingPostalCode\n \n , \n cast(null as TEXT) as \n \n MailingState\n \n , \n cast(null as TEXT) as \n \n MailingStateCode\n \n , \n cast(null as TEXT) as \n \n MailingStreet\n \n , \n cast(null as TEXT) as \n \n MasterRecordId\n \n , \n cast(null as TEXT) as \n \n MobilePhone\n \n , \n cast(null as TEXT) as \n \n OwnerId\n \n , \n cast(null as TEXT) as \n \n ReportsToId\n \n \n\n\n \n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_contact_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n cast(Id as TEXT) as contact_id,\n \n\n\n coalesce(cast(AccountId as TEXT),\n cast(account_id as TEXT))\n as account_id,\n \n\n\n cast(Department as TEXT) as department,\n \n\n\n cast(Description as TEXT) as contact_description,\n \n\n\n cast(Email as TEXT) as email,\n \n\n\n coalesce(cast(FirstName as TEXT),\n cast(first_name as TEXT))\n as first_name,\n \n\n\n coalesce(cast(HomePhone as TEXT),\n cast(home_phone as TEXT))\n as home_phone,\n \n\n\n coalesce(cast(IndividualId as TEXT),\n cast(individual_id as TEXT))\n as individual_id,\n \n\n\n coalesce(cast(IsDeleted as boolean),\n cast(is_deleted as boolean))\n as is_deleted,\n \n\n\n coalesce(cast(LastActivityDate as timestamp),\n cast(last_activity_date as timestamp))\n as last_activity_date,\n \n\n\n coalesce(cast(LastModifiedById as TEXT),\n cast(last_modified_by_id as TEXT))\n as last_modified_by_id,\n \n\n\n coalesce(cast(LastModifiedDate as timestamp),\n cast(last_modified_date as timestamp))\n as last_modified_date,\n \n\n\n coalesce(cast(LastName as TEXT),\n cast(last_name as TEXT))\n as last_name,\n \n\n\n coalesce(cast(LastReferencedDate as timestamp),\n cast(last_referenced_date as timestamp))\n as last_referenced_date,\n \n\n\n coalesce(cast(LastViewedDate as timestamp),\n cast(last_viewed_date as timestamp))\n as last_viewed_date,\n \n\n\n coalesce(cast(LeadSource as TEXT),\n cast(lead_source as TEXT))\n as lead_source,\n \n\n\n coalesce(cast(MailingCity as TEXT),\n cast(mailing_city as TEXT))\n as mailing_city,\n \n\n\n coalesce(cast(MailingCountry as TEXT),\n cast(mailing_country as TEXT))\n as mailing_country,\n \n\n\n coalesce(cast(MailingCountryCode as TEXT),\n cast(mailing_country_code as TEXT))\n as mailing_country_code,\n \n\n\n coalesce(cast(MailingPostalCode as TEXT),\n cast(mailing_postal_code as TEXT))\n as mailing_postal_code,\n \n\n\n coalesce(cast(MailingState as TEXT),\n cast(mailing_state as TEXT))\n as mailing_state,\n \n\n\n coalesce(cast(MailingStateCode as TEXT),\n cast(mailing_state_code as TEXT))\n as mailing_state_code,\n \n\n\n coalesce(cast(MailingStreet as TEXT),\n cast(mailing_street as TEXT))\n as mailing_street,\n \n\n\n coalesce(cast(MasterRecordId as TEXT),\n cast(master_record_id as TEXT))\n as master_record_id,\n \n\n\n coalesce(cast(MobilePhone as TEXT),\n cast(mobile_phone as TEXT))\n as mobile_phone,\n \n\n\n cast(Name as TEXT) as contact_name,\n \n\n\n coalesce(cast(OwnerId as TEXT),\n cast(owner_id as TEXT))\n as owner_id,\n \n\n\n cast(Phone as TEXT) as phone,\n \n\n\n coalesce(cast(ReportsToId as TEXT),\n cast(reports_to_id as TEXT))\n as reports_to_id,\n \n\n\n cast(Title as TEXT) as title\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__contact\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:28.881526Z", "completed_at": "2024-07-10T01:17:29.940799Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:29.945473Z", "completed_at": "2024-07-10T01:17:29.945481Z"}], "thread_id": "Thread-1", "execution_time": 1.1571872234344482, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__account", "compiled": true, "compiled_code": "with fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n account_number\n \n as \n \n account_number\n \n, \n \n \n account_source\n \n as \n \n account_source\n \n, \n \n \n annual_revenue\n \n as \n \n annual_revenue\n \n, \n \n \n billing_city\n \n as \n \n billing_city\n \n, \n \n \n billing_country\n \n as \n \n billing_country\n \n, \n \n \n billing_postal_code\n \n as \n \n billing_postal_code\n \n, \n \n \n billing_state\n \n as \n \n billing_state\n \n, \n \n \n billing_state_code\n \n as \n \n billing_state_code\n \n, \n \n \n billing_street\n \n as \n \n billing_street\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n industry\n \n as \n \n industry\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n last_activity_date\n \n as \n \n last_activity_date\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n master_record_id\n \n as \n \n master_record_id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n number_of_employees\n \n as \n \n number_of_employees\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n ownership\n \n as \n \n ownership\n \n, \n \n \n parent_id\n \n as \n \n parent_id\n \n, \n \n \n rating\n \n as \n \n rating\n \n, \n \n \n record_type_id\n \n as \n \n record_type_id\n \n, \n \n \n shipping_city\n \n as \n \n shipping_city\n \n, \n \n \n shipping_country\n \n as \n \n shipping_country\n \n, \n \n \n shipping_country_code\n \n as \n \n shipping_country_code\n \n, \n \n \n shipping_postal_code\n \n as \n \n shipping_postal_code\n \n, \n \n \n shipping_state\n \n as \n \n shipping_state\n \n, \n \n \n shipping_state_code\n \n as \n \n shipping_state_code\n \n, \n \n \n shipping_street\n \n as \n \n shipping_street\n \n, \n \n \n type\n \n as \n \n type\n \n, \n \n \n website\n \n as \n \n website\n \n, \n cast(null as TEXT) as \n \n AccountNumber\n \n , \n cast(null as TEXT) as \n \n AccountSource\n \n , \n cast(null as float) as \n \n AnnualRevenue\n \n , \n cast(null as TEXT) as \n \n BillingCity\n \n , \n cast(null as TEXT) as \n \n BillingCountry\n \n , \n cast(null as TEXT) as \n \n BillingPostalCode\n \n , \n cast(null as TEXT) as \n \n BillingState\n \n , \n cast(null as TEXT) as \n \n BillingStateCode\n \n , \n cast(null as TEXT) as \n \n BillingStreet\n \n , \n cast(null as boolean) as \n \n IsDeleted\n \n , \n cast(null as timestamp) as \n \n LastActivityDate\n \n , \n cast(null as timestamp) as \n \n LastReferencedDate\n \n , \n cast(null as timestamp) as \n \n LastViewedDate\n \n , \n cast(null as TEXT) as \n \n MasterRecordId\n \n , \n cast(null as integer) as \n \n NumberOfEmployees\n \n , \n cast(null as TEXT) as \n \n OwnerId\n \n , \n cast(null as TEXT) as \n \n ParentId\n \n , \n cast(null as TEXT) as \n \n RecordTypeId\n \n , \n cast(null as TEXT) as \n \n ShippingCity\n \n , \n cast(null as TEXT) as \n \n ShippingCountry\n \n , \n cast(null as TEXT) as \n \n ShippingCountryCode\n \n , \n cast(null as TEXT) as \n \n ShippingPostalCode\n \n , \n cast(null as TEXT) as \n \n ShippingState\n \n , \n cast(null as TEXT) as \n \n ShippingStateCode\n \n , \n cast(null as TEXT) as \n \n ShippingStreet\n \n \n\n\n\n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_account_data\"\n), \n\nfinal as (\n select\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n coalesce(cast(AccountNumber as TEXT),\n cast(account_number as TEXT))\n as account_number,\n \n\n\n coalesce(cast(AccountSource as TEXT),\n cast(account_source as TEXT))\n as account_source,\n \n\n\n coalesce(cast(AnnualRevenue as numeric(28,6)),\n cast(annual_revenue as numeric(28,6)))\n as annual_revenue,\n \n\n\n coalesce(cast(BillingCity as TEXT),\n cast(billing_city as TEXT))\n as billing_city,\n \n\n\n coalesce(cast(BillingCountry as TEXT),\n cast(billing_country as TEXT))\n as billing_country,\n \n\n\n coalesce(cast(BillingPostalCode as TEXT),\n cast(billing_postal_code as TEXT))\n as billing_postal_code,\n \n\n\n coalesce(cast(BillingState as TEXT),\n cast(billing_state as TEXT))\n as billing_state,\n \n\n\n coalesce(cast(BillingStateCode as TEXT),\n cast(billing_state_code as TEXT))\n as billing_state_code,\n \n\n\n coalesce(cast(BillingStreet as TEXT),\n cast(billing_street as TEXT))\n as billing_street,\n \n\n\n cast(Description as TEXT) as account_description,\n \n\n\n cast(Id as TEXT) as account_id,\n \n\n\n cast(Industry as TEXT) as industry,\n \n\n\n coalesce(cast(IsDeleted as boolean),\n cast(is_deleted as boolean))\n as is_deleted,\n \n\n\n coalesce(cast(LastActivityDate as timestamp),\n cast(last_activity_date as timestamp))\n as last_activity_date,\n \n\n\n coalesce(cast(LastReferencedDate as timestamp),\n cast(last_referenced_date as timestamp))\n as last_referenced_date,\n \n\n\n coalesce(cast(LastViewedDate as timestamp),\n cast(last_viewed_date as timestamp))\n as last_viewed_date,\n \n\n\n coalesce(cast(MasterRecordId as TEXT),\n cast(master_record_id as TEXT))\n as master_record_id,\n \n\n\n cast(Name as TEXT) as account_name,\n \n\n\n coalesce(cast(NumberOfEmployees as integer),\n cast(number_of_employees as integer))\n as number_of_employees,\n \n\n\n coalesce(cast(OwnerId as TEXT),\n cast(owner_id as TEXT))\n as owner_id,\n \n\n\n cast(Ownership as TEXT) as ownership,\n \n\n\n coalesce(cast(ParentId as TEXT),\n cast(parent_id as TEXT))\n as parent_id,\n \n\n\n cast(Rating as TEXT) as rating,\n \n\n\n coalesce(cast(RecordTypeId as TEXT),\n cast(record_type_id as TEXT))\n as record_type_id,\n \n\n\n coalesce(cast(ShippingCity as TEXT),\n cast(shipping_city as TEXT))\n as shipping_city,\n \n\n\n coalesce(cast(ShippingCountry as TEXT),\n cast(shipping_country as TEXT))\n as shipping_country,\n \n\n\n coalesce(cast(ShippingCountryCode as TEXT),\n cast(shipping_country_code as TEXT))\n as shipping_country_code,\n \n\n\n coalesce(cast(ShippingPostalCode as TEXT),\n cast(shipping_postal_code as TEXT))\n as shipping_postal_code,\n \n\n\n coalesce(cast(ShippingState as TEXT),\n cast(shipping_state as TEXT))\n as shipping_state,\n \n\n\n coalesce(cast(ShippingStateCode as TEXT),\n cast(shipping_state_code as TEXT))\n as shipping_state_code,\n \n\n\n coalesce(cast(ShippingStreet as TEXT),\n cast(shipping_street as TEXT))\n as shipping_street,\n \n\n\n cast(Type as TEXT) as type,\n \n\n\n cast(Website as TEXT) as website\n\n \n\n\n\n\n\n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__account\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.059780Z", "completed_at": "2024-07-10T01:17:30.060987Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.067518Z", "completed_at": "2024-07-10T01:17:30.067523Z"}], "thread_id": "Thread-4", "execution_time": 0.03121018409729004, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_account_data", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.061215Z", "completed_at": "2024-07-10T01:17:30.062361Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.067887Z", "completed_at": "2024-07-10T01:17:30.067890Z"}], "thread_id": "Thread-5", "execution_time": 0.0312647819519043, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_account_history_data", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.062578Z", "completed_at": "2024-07-10T01:17:30.063681Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.068221Z", "completed_at": "2024-07-10T01:17:30.068224Z"}], "thread_id": "Thread-8", "execution_time": 0.03132820129394531, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_contact_data", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.063885Z", "completed_at": "2024-07-10T01:17:30.065011Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.068549Z", "completed_at": "2024-07-10T01:17:30.068552Z"}], "thread_id": "Thread-2", "execution_time": 0.03138613700866699, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_contact_history_data", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.065613Z", "completed_at": "2024-07-10T01:17:30.067311Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.069231Z", "completed_at": "2024-07-10T01:17:30.069234Z"}], "thread_id": "Thread-1", "execution_time": 0.0314030647277832, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_event_data", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.072927Z", "completed_at": "2024-07-10T01:17:30.074075Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.079413Z", "completed_at": "2024-07-10T01:17:30.079417Z"}], "thread_id": "Thread-4", "execution_time": 0.008601188659667969, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_lead_data", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.074291Z", "completed_at": "2024-07-10T01:17:30.075375Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.079761Z", "completed_at": "2024-07-10T01:17:30.079764Z"}], "thread_id": "Thread-5", "execution_time": 0.008688926696777344, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_opportunity_data", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.075589Z", "completed_at": "2024-07-10T01:17:30.076665Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.080773Z", "completed_at": "2024-07-10T01:17:30.080776Z"}], "thread_id": "Thread-8", "execution_time": 0.009482145309448242, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_opportunity_history_data", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.076870Z", "completed_at": "2024-07-10T01:17:30.077949Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.081116Z", "completed_at": "2024-07-10T01:17:30.081118Z"}], "thread_id": "Thread-2", "execution_time": 0.009619951248168945, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_opportunity_line_item_data", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.078151Z", "completed_at": "2024-07-10T01:17:30.079217Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.081442Z", "completed_at": "2024-07-10T01:17:30.081444Z"}], "thread_id": "Thread-1", "execution_time": 0.009746789932250977, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_order_data", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.084744Z", "completed_at": "2024-07-10T01:17:30.085861Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.095067Z", "completed_at": "2024-07-10T01:17:30.095071Z"}], "thread_id": "Thread-4", "execution_time": 0.01228189468383789, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_product_2_data", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.086063Z", "completed_at": "2024-07-10T01:17:30.087126Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.095424Z", "completed_at": "2024-07-10T01:17:30.095428Z"}], "thread_id": "Thread-5", "execution_time": 0.01240396499633789, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_task_data", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.087333Z", "completed_at": "2024-07-10T01:17:30.088395Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.095746Z", "completed_at": "2024-07-10T01:17:30.095749Z"}], "thread_id": "Thread-8", "execution_time": 0.012521982192993164, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_user_data", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.088588Z", "completed_at": "2024-07-10T01:17:30.089675Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.096087Z", "completed_at": "2024-07-10T01:17:30.096089Z"}], "thread_id": "Thread-2", "execution_time": 0.012664079666137695, "adapter_response": {}, "message": null, "failures": null, "unique_id": "seed.salesforce_source_integration_tests.sf_user_role_data", "compiled": null, "compiled_code": null, "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.089870Z", "completed_at": "2024-07-10T01:17:30.098385Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.099306Z", "completed_at": "2024-07-10T01:17:30.099309Z"}], "thread_id": "Thread-1", "execution_time": 0.01568913459777832, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__opportunity_line_item_opportunity_line_item_id.b5d2465072", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect opportunity_line_item_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__opportunity_line_item\"\nwhere opportunity_line_item_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.107524Z", "completed_at": "2024-07-10T01:17:30.116765Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.117107Z", "completed_at": "2024-07-10T01:17:30.117114Z"}], "thread_id": "Thread-8", "execution_time": 0.019253015518188477, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__event_event_id.13f7c8c0d9", "compiled": true, "compiled_code": "\n \n \n\nselect\n event_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__event\"\nwhere event_id is not null\ngroup by event_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.099626Z", "completed_at": "2024-07-10T01:17:30.117856Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.118875Z", "completed_at": "2024-07-10T01:17:30.118878Z"}], "thread_id": "Thread-4", "execution_time": 0.02150106430053711, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__opportunity_line_item_opportunity_line_item_id.c18042d902", "compiled": true, "compiled_code": "\n \n \n\nselect\n opportunity_line_item_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__opportunity_line_item\"\nwhere opportunity_line_item_id is not null\ngroup by opportunity_line_item_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.109985Z", "completed_at": "2024-07-10T01:17:30.118073Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.119218Z", "completed_at": "2024-07-10T01:17:30.119221Z"}], "thread_id": "Thread-2", "execution_time": 0.021086931228637695, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__lead_lead_id.e2ba6b2026", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect lead_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__lead\"\nwhere lead_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.113526Z", "completed_at": "2024-07-10T01:17:30.118501Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.119758Z", "completed_at": "2024-07-10T01:17:30.119761Z"}], "thread_id": "Thread-1", "execution_time": 0.0068209171295166016, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__order_order_id.4782f3b34f", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect order_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__order\"\nwhere order_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.104841Z", "completed_at": "2024-07-10T01:17:30.118696Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.120103Z", "completed_at": "2024-07-10T01:17:30.120106Z"}], "thread_id": "Thread-5", "execution_time": 0.02244400978088379, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__event_event_id.e964b30db8", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect event_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__event\"\nwhere event_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.120945Z", "completed_at": "2024-07-10T01:17:30.126279Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.132011Z", "completed_at": "2024-07-10T01:17:30.132016Z"}], "thread_id": "Thread-8", "execution_time": 0.013821125030517578, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__lead_lead_id.ba8b21e282", "compiled": true, "compiled_code": "\n \n \n\nselect\n lead_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__lead\"\nwhere lead_id is not null\ngroup by lead_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.129371Z", "completed_at": "2024-07-10T01:17:30.138131Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.138790Z", "completed_at": "2024-07-10T01:17:30.138795Z"}], "thread_id": "Thread-2", "execution_time": 0.01372218132019043, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__opportunity_opportunity_id.234c5e60bd", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect opportunity_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__opportunity\"\nwhere opportunity_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.126836Z", "completed_at": "2024-07-10T01:17:30.138567Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.142785Z", "completed_at": "2024-07-10T01:17:30.142789Z"}], "thread_id": "Thread-4", "execution_time": 0.01794910430908203, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__order_order_id.12a96b4e3c", "compiled": true, "compiled_code": "\n \n \n\nselect\n order_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__order\"\nwhere order_id is not null\ngroup by order_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.132430Z", "completed_at": "2024-07-10T01:17:30.139152Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.143383Z", "completed_at": "2024-07-10T01:17:30.143386Z"}], "thread_id": "Thread-1", "execution_time": 0.01803898811340332, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__product_2_product_2_id.84aed29e8a", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect product_2_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__product_2\"\nwhere product_2_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.134947Z", "completed_at": "2024-07-10T01:17:30.142573Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.143767Z", "completed_at": "2024-07-10T01:17:30.143770Z"}], "thread_id": "Thread-5", "execution_time": 0.0182039737701416, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__opportunity_opportunity_id.367b0f577a", "compiled": true, "compiled_code": "\n \n \n\nselect\n opportunity_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__opportunity\"\nwhere opportunity_id is not null\ngroup by opportunity_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.139360Z", "completed_at": "2024-07-10T01:17:30.145089Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.146213Z", "completed_at": "2024-07-10T01:17:30.146216Z"}], "thread_id": "Thread-8", "execution_time": 0.008443832397460938, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__product_2_product_2_id.b4bc489d61", "compiled": true, "compiled_code": "\n \n \n\nselect\n product_2_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__product_2\"\nwhere product_2_id is not null\ngroup by product_2_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.146729Z", "completed_at": "2024-07-10T01:17:30.157209Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.157525Z", "completed_at": "2024-07-10T01:17:30.157529Z"}], "thread_id": "Thread-2", "execution_time": 0.013208150863647461, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__contact_contact_id.d7c02bef78", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect contact_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__contact\"\nwhere contact_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.152226Z", "completed_at": "2024-07-10T01:17:30.157972Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.158192Z", "completed_at": "2024-07-10T01:17:30.158195Z"}], "thread_id": "Thread-1", "execution_time": 0.012542247772216797, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__account_account_id.1e0ff361d4", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect account_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__account\"\nwhere account_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.154689Z", "completed_at": "2024-07-10T01:17:30.158585Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.158788Z", "completed_at": "2024-07-10T01:17:30.158791Z"}], "thread_id": "Thread-5", "execution_time": 0.012925863265991211, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__account_account_id.6d58a39ba7", "compiled": true, "compiled_code": "\n \n \n\nselect\n account_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__account\"\nwhere account_id is not null\ngroup by account_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.149664Z", "completed_at": "2024-07-10T01:17:30.159168Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.159358Z", "completed_at": "2024-07-10T01:17:30.159361Z"}], "thread_id": "Thread-4", "execution_time": 0.014095783233642578, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__contact_contact_id.0cc2c0609e", "compiled": true, "compiled_code": "\n \n \n\nselect\n contact_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__contact\"\nwhere contact_id is not null\ngroup by contact_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:29.958540Z", "completed_at": "2024-07-10T01:17:30.739059Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.739739Z", "completed_at": "2024-07-10T01:17:30.739744Z"}], "thread_id": "Thread-6", "execution_time": 0.8450989723205566, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__task", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__task_enabled variable within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n account_id\n \n as \n \n account_id\n \n, \n \n \n activity_date\n \n as \n \n activity_date\n \n, \n \n \n call_disposition\n \n as \n \n call_disposition\n \n, \n \n \n call_duration_in_seconds\n \n as \n \n call_duration_in_seconds\n \n, \n \n \n call_object\n \n as \n \n call_object\n \n, \n \n \n call_type\n \n as \n \n call_type\n \n, \n \n \n completed_date_time\n \n as \n \n completed_date_time\n \n, \n \n \n created_by_id\n \n as \n \n created_by_id\n \n, \n \n \n created_date\n \n as \n \n created_date\n \n, \n \n \n description\n \n as \n \n description\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n is_archived\n \n as \n \n is_archived\n \n, \n \n \n is_closed\n \n as \n \n is_closed\n \n, \n \n \n is_deleted\n \n as \n \n is_deleted\n \n, \n \n \n is_high_priority\n \n as \n \n is_high_priority\n \n, \n \n \n last_modified_by_id\n \n as \n \n last_modified_by_id\n \n, \n \n \n last_modified_date\n \n as \n \n last_modified_date\n \n, \n \n \n owner_id\n \n as \n \n owner_id\n \n, \n \n \n priority\n \n as \n \n priority\n \n, \n \n \n record_type_id\n \n as \n \n record_type_id\n \n, \n \n \n status\n \n as \n \n status\n \n, \n \n \n subject\n \n as \n \n subject\n \n, \n \n \n task_subtype\n \n as \n \n task_subtype\n \n, \n \n \n type\n \n as \n \n type\n \n, \n \n \n what_count\n \n as \n \n what_count\n \n, \n \n \n what_id\n \n as \n \n what_id\n \n, \n \n \n who_count\n \n as \n \n who_count\n \n, \n \n \n who_id\n \n as \n \n who_id\n \n, \n cast(null as TEXT) as \n \n AccountId\n \n , \n cast(null as timestamp) as \n \n ActivityDate\n \n , \n cast(null as TEXT) as \n \n CallDisposition\n \n , \n cast(null as integer) as \n \n CallDurationInSeconds\n \n , \n cast(null as TEXT) as \n \n CallObject\n \n , \n cast(null as TEXT) as \n \n CallType\n \n , \n cast(null as timestamp) as \n \n CompletedDateTime\n \n , \n cast(null as TEXT) as \n \n CreatedById\n \n , \n cast(null as timestamp) as \n \n CreatedDate\n \n , \n cast(null as boolean) as \n \n IsArchived\n \n , \n cast(null as boolean) as \n \n IsClosed\n \n , \n cast(null as boolean) as \n \n IsDeleted\n \n , \n cast(null as boolean) as \n \n IsHighPriority\n \n , \n cast(null as TEXT) as \n \n LastModifiedById\n \n , \n cast(null as timestamp) as \n \n LastModifiedDate\n \n , \n cast(null as TEXT) as \n \n OwnerId\n \n , \n cast(null as TEXT) as \n \n RecordTypeId\n \n , \n cast(null as TEXT) as \n \n TaskSubtype\n \n , \n cast(null as integer) as \n \n WhatCount\n \n , \n cast(null as TEXT) as \n \n WhatId\n \n , \n cast(null as integer) as \n \n WhoCount\n \n , \n cast(null as TEXT) as \n \n WhoId\n \n \n\n\n \n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_task_data\"\n), \n\nfinal as (\n \n select \n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n cast(Id as TEXT) as task_id,\n \n\n\n coalesce(cast(AccountId as TEXT),\n cast(account_id as TEXT))\n as account_id,\n \n\n\n coalesce(cast(ActivityDate as timestamp),\n cast(activity_date as timestamp))\n as activity_date,\n \n\n\n coalesce(cast(CallDisposition as TEXT),\n cast(call_disposition as TEXT))\n as call_disposition,\n \n\n\n coalesce(cast(CallDurationInSeconds as integer),\n cast(call_duration_in_seconds as integer))\n as call_duration_in_seconds,\n \n\n\n coalesce(cast(CallObject as TEXT),\n cast(call_object as TEXT))\n as call_object,\n \n\n\n coalesce(cast(CallType as TEXT),\n cast(call_type as TEXT))\n as call_type,\n \n\n\n coalesce(cast(CompletedDateTime as timestamp),\n cast(completed_date_time as timestamp))\n as completed_date_time,\n \n\n\n coalesce(cast(CreatedById as TEXT),\n cast(created_by_id as TEXT))\n as created_by_id,\n \n\n\n coalesce(cast(CreatedDate as timestamp),\n cast(created_date as timestamp))\n as created_date,\n \n\n\n cast(Description as TEXT) as task_description,\n \n\n\n coalesce(cast(IsArchived as boolean),\n cast(is_archived as boolean))\n as is_archived,\n \n\n\n coalesce(cast(IsClosed as boolean),\n cast(is_closed as boolean))\n as is_closed,\n \n\n\n coalesce(cast(IsDeleted as boolean),\n cast(is_deleted as boolean))\n as is_deleted,\n \n\n\n coalesce(cast(IsHighPriority as boolean),\n cast(is_high_priority as boolean))\n as is_high_priority,\n \n\n\n coalesce(cast(LastModifiedById as TEXT),\n cast(last_modified_by_id as TEXT))\n as last_modified_by_id,\n \n\n\n coalesce(cast(LastModifiedDate as timestamp),\n cast(last_modified_date as timestamp))\n as last_modified_date,\n \n\n\n coalesce(cast(OwnerId as TEXT),\n cast(owner_id as TEXT))\n as owner_id,\n \n\n\n cast(Priority as TEXT) as priority,\n \n\n\n coalesce(cast(RecordTypeId as TEXT),\n cast(record_type_id as TEXT))\n as record_type_id,\n \n\n\n cast(Status as TEXT) as status,\n \n\n\n cast(Subject as TEXT) as subject,\n \n\n\n coalesce(cast(TaskSubtype as TEXT),\n cast(task_subtype as TEXT))\n as task_subtype,\n \n\n\n cast(Type as TEXT) as type,\n \n\n\n coalesce(cast(WhatCount as integer),\n cast(what_count as integer))\n as what_count,\n \n\n\n coalesce(cast(WhatId as TEXT),\n cast(what_id as TEXT))\n as what_id,\n \n\n\n coalesce(cast(WhoCount as integer),\n cast(who_count as integer))\n as who_count,\n \n\n\n coalesce(cast(WhoId as TEXT),\n cast(who_id as TEXT))\n as who_id\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final\nwhere not coalesce(is_deleted, false)", "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__task\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.044949Z", "completed_at": "2024-07-10T01:17:30.738685Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.739361Z", "completed_at": "2024-07-10T01:17:30.739369Z"}], "thread_id": "Thread-7", "execution_time": 0.76792311668396, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__user_role", "compiled": true, "compiled_code": "--To disable this model, set the salesforce__user_role_enabled within your dbt_project.yml file to False.\n\n\nwith fields as (\n\n select\n \n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n developer_name\n \n as \n \n developer_name\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n opportunity_access_for_account_owner\n \n as \n \n opportunity_access_for_account_owner\n \n, \n \n \n parent_role_id\n \n as \n \n parent_role_id\n \n, \n \n \n rollup_description\n \n as \n \n rollup_description\n \n, \n cast(null as TEXT) as \n \n DeveloperName\n \n , \n cast(null as TEXT) as \n \n OpportunityAccessForAccountOwner\n \n , \n cast(null as TEXT) as \n \n ParentRoleId\n \n , \n cast(null as TEXT) as \n \n RollupDescription\n \n \n\n\n\n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_user_role_data\"\n), \n\nfinal as (\n\n select\n _fivetran_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n coalesce(cast(DeveloperName as TEXT),\n cast(developer_name as TEXT))\n as developer_name,\n \n\n\n cast(Id as TEXT) as user_role_id,\n \n\n\n cast(Name as TEXT) as user_role_name,\n \n\n\n coalesce(cast(OpportunityAccessForAccountOwner as TEXT),\n cast(opportunity_access_for_account_owner as TEXT))\n as opportunity_access_for_account_owner,\n \n\n\n coalesce(cast(ParentRoleId as TEXT),\n cast(parent_role_id as TEXT))\n as parent_role_id,\n \n\n\n coalesce(cast(RollupDescription as TEXT),\n cast(rollup_description as TEXT))\n as rollup_description\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect *\nfrom final", "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__user_role\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.038934Z", "completed_at": "2024-07-10T01:17:30.740055Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.740427Z", "completed_at": "2024-07-10T01:17:30.740433Z"}], "thread_id": "Thread-3", "execution_time": 0.7804112434387207, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.salesforce_source.stg_salesforce__user", "compiled": true, "compiled_code": "with fields as (\n\n select\n\n \n \n \n _fivetran_deleted\n \n as \n \n _fivetran_deleted\n \n, \n \n \n _fivetran_active\n \n as \n \n _fivetran_active\n \n, \n \n \n _fivetran_synced\n \n as \n \n _fivetran_synced\n \n, \n \n \n account_id\n \n as \n \n account_id\n \n, \n \n \n alias\n \n as \n \n alias\n \n, \n \n \n city\n \n as \n \n city\n \n, \n \n \n company_name\n \n as \n \n company_name\n \n, \n \n \n contact_id\n \n as \n \n contact_id\n \n, \n \n \n country\n \n as \n \n country\n \n, \n \n \n country_code\n \n as \n \n country_code\n \n, \n \n \n department\n \n as \n \n department\n \n, \n \n \n email\n \n as \n \n email\n \n, \n \n \n first_name\n \n as \n \n first_name\n \n, \n \n \n id\n \n as \n \n id\n \n, \n \n \n individual_id\n \n as \n \n individual_id\n \n, \n \n \n is_active\n \n as \n \n is_active\n \n, \n \n \n last_login_date\n \n as \n \n last_login_date\n \n, \n \n \n last_name\n \n as \n \n last_name\n \n, \n \n \n last_referenced_date\n \n as \n \n last_referenced_date\n \n, \n \n \n last_viewed_date\n \n as \n \n last_viewed_date\n \n, \n \n \n manager_id\n \n as \n \n manager_id\n \n, \n \n \n name\n \n as \n \n name\n \n, \n \n \n postal_code\n \n as \n \n postal_code\n \n, \n \n \n profile_id\n \n as \n \n profile_id\n \n, \n \n \n state\n \n as \n \n state\n \n, \n \n \n state_code\n \n as \n \n state_code\n \n, \n \n \n street\n \n as \n \n street\n \n, \n \n \n title\n \n as \n \n title\n \n, \n \n \n user_role_id\n \n as \n \n user_role_id\n \n, \n \n \n user_type\n \n as \n \n user_type\n \n, \n \n \n username\n \n as \n \n username\n \n, \n cast(null as TEXT) as \n \n AccountId\n \n , \n cast(null as TEXT) as \n \n CompanyName\n \n , \n cast(null as TEXT) as \n \n ContactId\n \n , \n cast(null as TEXT) as \n \n CountryCode\n \n , \n cast(null as TEXT) as \n \n FirstName\n \n , \n cast(null as TEXT) as \n \n IndividualId\n \n , \n cast(null as boolean) as \n \n IsActive\n \n , \n cast(null as timestamp) as \n \n LastLoginDate\n \n , \n cast(null as TEXT) as \n \n LastName\n \n , \n cast(null as timestamp) as \n \n LastReferencedDate\n \n , \n cast(null as timestamp) as \n \n LastViewedDate\n \n , \n cast(null as TEXT) as \n \n ManagerId\n \n , \n cast(null as TEXT) as \n \n PostalCode\n \n , \n cast(null as TEXT) as \n \n ProfileId\n \n , \n cast(null as TEXT) as \n \n StateCode\n \n , \n cast(null as TEXT) as \n \n UserRoleId\n \n , \n cast(null as TEXT) as \n \n UserType\n \n \n\n\n\n from \"postgres\".\"zz_dbt_catherine_sf\".\"sf_user_data\"\n), \n\nfinal as (\n \n select \n _fivetran_deleted,\n cast(_fivetran_synced as timestamp) as _fivetran_synced,\n \n\n\n coalesce(cast(AccountId as TEXT),\n cast(account_id as TEXT))\n as account_id,\n \n\n\n cast(Alias as TEXT) as alias,\n \n\n\n cast(City as TEXT) as city,\n \n\n\n coalesce(cast(CompanyName as TEXT),\n cast(company_name as TEXT))\n as company_name,\n \n\n\n coalesce(cast(ContactId as TEXT),\n cast(contact_id as TEXT))\n as contact_id,\n \n\n\n cast(Country as TEXT) as country,\n \n\n\n coalesce(cast(CountryCode as TEXT),\n cast(country_code as TEXT))\n as country_code,\n \n\n\n cast(Department as TEXT) as department,\n \n\n\n cast(Email as TEXT) as email,\n \n\n\n coalesce(cast(FirstName as TEXT),\n cast(first_name as TEXT))\n as first_name,\n \n\n\n cast(Id as TEXT) as user_id,\n \n\n\n coalesce(cast(IndividualId as TEXT),\n cast(individual_id as TEXT))\n as individual_id,\n \n\n\n coalesce(cast(IsActive as boolean),\n cast(is_active as boolean))\n as is_active,\n \n\n\n coalesce(cast(LastLoginDate as timestamp),\n cast(last_login_date as timestamp))\n as last_login_date,\n \n\n\n coalesce(cast(LastName as TEXT),\n cast(last_name as TEXT))\n as last_name,\n \n\n\n coalesce(cast(LastReferencedDate as timestamp),\n cast(last_referenced_date as timestamp))\n as last_referenced_date,\n \n\n\n coalesce(cast(LastViewedDate as timestamp),\n cast(last_viewed_date as timestamp))\n as last_viewed_date,\n \n\n\n coalesce(cast(ManagerId as TEXT),\n cast(manager_id as TEXT))\n as manager_id,\n \n\n\n cast(Name as TEXT) as user_name,\n \n\n\n coalesce(cast(PostalCode as TEXT),\n cast(postal_code as TEXT))\n as postal_code,\n \n\n\n coalesce(cast(ProfileId as TEXT),\n cast(profile_id as TEXT))\n as profile_id,\n \n\n\n cast(State as TEXT) as state,\n \n\n\n coalesce(cast(StateCode as TEXT),\n cast(state_code as TEXT))\n as state_code,\n \n\n\n cast(Street as TEXT) as street,\n \n\n\n cast(Title as TEXT) as title,\n \n\n\n coalesce(cast(UserRoleId as TEXT),\n cast(user_role_id as TEXT))\n as user_role_id,\n \n\n\n coalesce(cast(UserType as TEXT),\n cast(user_type as TEXT))\n as user_type,\n \n\n\n cast(Username as TEXT) as username\n \n \n\n\n\n\n \n from fields\n where coalesce(_fivetran_active, true)\n)\n\nselect * \nfrom final", "relation_name": "\"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__user\""}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.808454Z", "completed_at": "2024-07-10T01:17:30.825495Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.832138Z", "completed_at": "2024-07-10T01:17:30.832145Z"}], "thread_id": "Thread-8", "execution_time": 0.026763916015625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__task_task_id.aabe11a5d9", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect task_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__task\"\nwhere task_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.816527Z", "completed_at": "2024-07-10T01:17:30.832689Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.834372Z", "completed_at": "2024-07-10T01:17:30.834376Z"}], "thread_id": "Thread-2", "execution_time": 0.02721881866455078, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__task_task_id.73684ed605", "compiled": true, "compiled_code": "\n \n \n\nselect\n task_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__task\"\nwhere task_id is not null\ngroup by task_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.821337Z", "completed_at": "2024-07-10T01:17:30.833070Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.834858Z", "completed_at": "2024-07-10T01:17:30.834862Z"}], "thread_id": "Thread-1", "execution_time": 0.020668983459472656, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__user_role_user_role_id.949036e9bd", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect user_role_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__user_role\"\nwhere user_role_id is null\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.825882Z", "completed_at": "2024-07-10T01:17:30.834087Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.835884Z", "completed_at": "2024-07-10T01:17:30.835888Z"}], "thread_id": "Thread-5", "execution_time": 0.020914793014526367, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__user_role_user_role_id.1259050718", "compiled": true, "compiled_code": "\n \n \n\nselect\n user_role_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__user_role\"\nwhere user_role_id is not null\ngroup by user_role_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.840489Z", "completed_at": "2024-07-10T01:17:30.844116Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.844642Z", "completed_at": "2024-07-10T01:17:30.844647Z"}], "thread_id": "Thread-7", "execution_time": 0.011029958724975586, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.unique_stg_salesforce__user_user_id.9a29b41152", "compiled": true, "compiled_code": "\n \n \n\nselect\n user_id as unique_field,\n count(*) as n_records\n\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__user\"\nwhere user_id is not null\ngroup by user_id\nhaving count(*) > 1\n\n\n", "relation_name": null}, {"status": "success", "timing": [{"name": "compile", "started_at": "2024-07-10T01:17:30.836494Z", "completed_at": "2024-07-10T01:17:30.844389Z"}, {"name": "execute", "started_at": "2024-07-10T01:17:30.845097Z", "completed_at": "2024-07-10T01:17:30.845101Z"}], "thread_id": "Thread-6", "execution_time": 0.011818885803222656, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.salesforce_source.not_null_stg_salesforce__user_user_id.ac0ab26d65", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect user_id\nfrom \"postgres\".\"zz_dbt_catherine_sf_salesforce_source_dev\".\"stg_salesforce__user\"\nwhere user_id is null\n\n\n", "relation_name": null}], "elapsed_time": 4.293415069580078, "args": {"source_freshness_run_project_hooks": false, "partial_parse_file_diff": true, "favor_state": false, "send_anonymous_usage_stats": true, "static_parser": true, "strict_mode": false, "invocation_command": "dbt docs generate", "warn_error_options": {"include": [], "exclude": []}, "macro_debugging": false, "populate_cache": true, "version_check": true, "static": false, "log_file_max_bytes": 10485760, "empty_catalog": false, "indirect_selection": "eager", "partial_parse": true, "defer": false, "cache_selected_only": false, "write_json": true, "log_path": "/Users/catherinefritz/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests/logs", "print": true, "quiet": false, "profiles_dir": "/Users/catherinefritz/.dbt", "printer_width": 80, "require_explicit_package_overrides_for_builtin_materializations": true, "project_dir": "/Users/catherinefritz/Documents/dbt_packages/salesforce/dbt_salesforce_source/integration_tests", "use_colors": true, "use_colors_file": true, "introspect": true, "vars": {}, "which": "generate", "compile": true, "require_resource_names_without_spaces": false, "log_level_file": "debug", "log_level": "info", "select": [], "log_format_file": "debug", "show_resource_report": false, "exclude": [], "enable_legacy_logger": false, "log_format": "default"}} \ No newline at end of file diff --git a/integration_tests/.gitignore b/integration_tests/.gitignore index cb082a2..5cb3159 100644 --- a/integration_tests/.gitignore +++ b/integration_tests/.gitignore @@ -2,4 +2,5 @@ target/ dbt_modules/ logs/ -env/ \ No newline at end of file +env/ +package-lock.yml \ No newline at end of file diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index 848a163..cd8eb50 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -1,10 +1,13 @@ name: 'salesforce_source_integration_tests' -version: '1.0.1' +version: '1.1.0' config-version: 2 profile: 'integration_tests' +models: + +schema: "salesforce_source_{{ var('directed_schema','dev') }}" + vars: salesforce_source: salesforce_schema: salesforce_source_integrations_tests_3 diff --git a/integration_tests/tests/consistency/consistency_all_tables_and_columns.sql b/integration_tests/tests/consistency/consistency_all_tables_and_columns.sql new file mode 100644 index 0000000..fe4f47d --- /dev/null +++ b/integration_tests/tests/consistency/consistency_all_tables_and_columns.sql @@ -0,0 +1,62 @@ +{{ config( + tags="fivetran_validations", + enabled=var('fivetran_validation_tests_enabled', false) +) }} + +/* This test is to make sure the final columns produced are the same between versions. +Only one test is needed since it will fetch all tables and all columns in each schema. +!!! THIS TEST IS WRITTEN FOR BIGQUERY!!! */ +{% if target.type == 'bigquery' %} +with prod as ( + select + table_name, + column_name, + data_type + from {{ target.schema }}_salesforce_source_prod.INFORMATION_SCHEMA.COLUMNS + where table_name like 'stg_%' +), + +dev as ( + select + table_name, + column_name, + data_type + from {{ target.schema }}_salesforce_source_dev.INFORMATION_SCHEMA.COLUMNS + where table_name like 'stg_%' +), + +prod_not_in_dev as ( + -- rows from prod not found in dev + select * from prod + except distinct + select * from dev +), + +dev_not_in_prod as ( + -- rows from dev not found in prod + select * from dev + except distinct + select * from prod +), + +final as ( + select + *, + 'from prod' as source + from prod_not_in_dev + + union all -- union since we only care if rows are produced + + select + *, + 'from dev' as source + from dev_not_in_prod +) + +select * +from final + +{% else %} +{{ print('This is written to run on bigquery. If you need to run on another warehouse, add a version!') }} + +{% endif %} \ No newline at end of file diff --git a/macros/add_renamed_columns.sql b/macros/add_renamed_columns.sql new file mode 100644 index 0000000..4288df3 --- /dev/null +++ b/macros/add_renamed_columns.sql @@ -0,0 +1,24 @@ +{% macro add_renamed_columns(column_list) %} +{# This macro determines the original names for each column and adds them to the list generated within each `get_*_columns` macro. By default, this macro processes column names by removing underscores and capitalizing each part that follows an underscore. This ensures all necessary columns are available for use in the `coalesce_rename` macro. Additionally, this macro tags each column with its renamed version to maintain tracking. #} + +{%- set renamed_columns = [] %} + +{%- for col in column_list %} + + {%- set original_column_name = col.name %} + + {%- if 'fivetran' not in original_column_name %} + {# Use renamed_column_name value if it provided in the get_columns macro #} + {%- set renamed_column_name = col.renamed_column_name | default(original_column_name.split('_') | map('capitalize') | join('')) %} + + {# Add an entry to the list of renames to populate the filled columns if the rename is different #} + {%- do renamed_columns.append({"name": renamed_column_name, "datatype": col.datatype, "is_rename": true}) if renamed_column_name|lower != original_column_name|lower %} + + {# Update the original column with the renamed column name for use later. #} + {%- set col = col.update({ "renamed_column_name": renamed_column_name, "is_rename": false}) %} + {%- endif %} +{%- endfor %} + +{%- do column_list.extend(renamed_columns) %} + +{% endmacro %} diff --git a/macros/coalesce_rename.sql b/macros/coalesce_rename.sql new file mode 100644 index 0000000..5b0368c --- /dev/null +++ b/macros/coalesce_rename.sql @@ -0,0 +1,21 @@ +{% macro coalesce_rename( + column_key, + column_dict, + original_column_name=column_dict[column_key]["name"], + datatype=column_dict[column_key]["datatype"], + alias=column_dict[column_key]["alias"] | default(original_column_name), + renamed_column_name=column_dict[column_key]["renamed_column_name"] + ) %} + +{# This macro accomodates Fivetran connectors that keep the original salesforce field naming conventions without underscores #} +{# Utilizes the dictionary generated by `column_list_to_dict` to coalesce a column with its renamed counterpart, producing the final column. This macro also allows for the passing of a custom renamed spelling, datatype, and alias as arguments to override default values. #} +{%- if original_column_name|lower == renamed_column_name|lower %} + cast({{ renamed_column_name }} as {{ datatype }}) as {{ alias }} + +{%- else %} + coalesce(cast({{ renamed_column_name }} as {{ datatype }}), + cast({{ original_column_name }} as {{ datatype }})) + as {{ alias }} + +{%- endif %} +{%- endmacro %} \ No newline at end of file diff --git a/macros/column_list_to_dict.sql b/macros/column_list_to_dict.sql new file mode 100644 index 0000000..703ff69 --- /dev/null +++ b/macros/column_list_to_dict.sql @@ -0,0 +1,9 @@ +{% macro column_list_to_dict(column_list) %} +{# This macro converts the list of dictionaries generated by the `get_*_columns` macros into a dictionary of dictionaries for use in the `coalesce_rename` macro. This conversion is necessary so that each column dictionary entry can be accessed by a key, rather than iterating through a list. #} + {%- set column_dict = {} -%} + {%- for col in column_list -%} + {%- do column_dict.update({col.name: col}) if not col.is_rename -%} + {%- endfor -%} + {{ return(column_dict) }} + +{% endmacro %} \ No newline at end of file diff --git a/macros/get_account_columns.sql b/macros/get_account_columns.sql index a61bc0e..c3ebd0d 100644 --- a/macros/get_account_columns.sql +++ b/macros/get_account_columns.sql @@ -3,7 +3,7 @@ {% set columns = [ {"name": "_fivetran_synced", "datatype": dbt.type_timestamp()}, - {"name": "_fivetran_active", "datatype": "boolean"}, + {"name": "_fivetran_active", "datatype": dbt.type_boolean()}, {"name": "account_number", "datatype": dbt.type_string()}, {"name": "account_source", "datatype": dbt.type_string()}, {"name": "annual_revenue", "datatype": dbt.type_float()}, @@ -16,7 +16,7 @@ {"name": "description", "datatype": dbt.type_string()}, {"name": "id", "datatype": dbt.type_string()}, {"name": "industry", "datatype": dbt.type_string()}, - {"name": "is_deleted", "datatype": "boolean"}, + {"name": "is_deleted", "datatype": dbt.type_boolean()}, {"name": "last_activity_date", "datatype": dbt.type_timestamp()}, {"name": "last_referenced_date", "datatype": dbt.type_timestamp()}, {"name": "last_viewed_date", "datatype": dbt.type_timestamp()}, @@ -39,6 +39,8 @@ {"name": "website", "datatype": dbt.type_string()} ] %} +{{ salesforce_source.add_renamed_columns(columns) }} + {{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__account_pass_through_columns')) }} {{ return(columns) }} diff --git a/macros/get_contact_columns.sql b/macros/get_contact_columns.sql index 3185589..2c2d638 100644 --- a/macros/get_contact_columns.sql +++ b/macros/get_contact_columns.sql @@ -2,7 +2,7 @@ {% set columns = [ {"name": "_fivetran_synced", "datatype": dbt.type_timestamp()}, - {"name": "_fivetran_active", "datatype": "boolean"}, + {"name": "_fivetran_active", "datatype": dbt.type_boolean()}, {"name": "account_id", "datatype": dbt.type_string()}, {"name": "department", "datatype": dbt.type_string()}, {"name": "description", "datatype": dbt.type_string()}, @@ -35,6 +35,8 @@ {"name": "title", "datatype": dbt.type_string()}, ] %} +{{ salesforce_source.add_renamed_columns(columns) }} + {{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__contact_pass_through_columns')) }} {{ return(columns) }} diff --git a/macros/get_event_columns.sql b/macros/get_event_columns.sql index e1d2573..9e3a323 100644 --- a/macros/get_event_columns.sql +++ b/macros/get_event_columns.sql @@ -2,7 +2,7 @@ {% set columns = [ {"name": "_fivetran_synced", "datatype": dbt.type_timestamp()}, - {"name": "_fivetran_active", "datatype": "boolean"}, + {"name": "_fivetran_active", "datatype": dbt.type_boolean()}, {"name": "account_id", "datatype": dbt.type_string()}, {"name": "activity_date", "datatype": dbt.type_timestamp()}, {"name": "activity_date_time", "datatype": dbt.type_timestamp()}, @@ -32,6 +32,8 @@ {"name": "who_id", "datatype": dbt.type_string()} ] %} +{{ salesforce_source.add_renamed_columns(columns) }} + {{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__event_pass_through_columns')) }} {{ return(columns) }} diff --git a/macros/get_lead_columns.sql b/macros/get_lead_columns.sql index ef8f556..1236e8b 100644 --- a/macros/get_lead_columns.sql +++ b/macros/get_lead_columns.sql @@ -2,7 +2,7 @@ {% set columns = [ {"name": "_fivetran_synced", "datatype": dbt.type_timestamp()}, - {"name": "_fivetran_active", "datatype": "boolean"}, + {"name": "_fivetran_active", "datatype": dbt.type_boolean()}, {"name": "annual_revenue", "datatype": dbt.type_float()}, {"name": "city", "datatype": dbt.type_string()}, {"name": "company", "datatype": dbt.type_string()}, @@ -48,6 +48,8 @@ {"name": "website", "datatype": dbt.type_string()}, ] %} +{{ salesforce_source.add_renamed_columns(columns) }} + {{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__lead_pass_through_columns')) }} {{ return(columns) }} diff --git a/macros/get_opportunity_columns.sql b/macros/get_opportunity_columns.sql index cb107e4..92fd6bf 100644 --- a/macros/get_opportunity_columns.sql +++ b/macros/get_opportunity_columns.sql @@ -34,9 +34,11 @@ {"name": "record_type_id", "datatype": dbt.type_string()}, {"name": "stage_name", "datatype": dbt.type_string()}, {"name": "synced_quote_id", "datatype": dbt.type_string()}, - {"name": "type", "datatype": dbt.type_string()}, + {"name": "type", "datatype": dbt.type_string()} ] %} +{{ salesforce_source.add_renamed_columns(columns) }} + {{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__opportunity_pass_through_columns')) }} {{ return(columns) }} diff --git a/macros/get_opportunity_line_item_columns.sql b/macros/get_opportunity_line_item_columns.sql index 5b26f44..99b4e10 100644 --- a/macros/get_opportunity_line_item_columns.sql +++ b/macros/get_opportunity_line_item_columns.sql @@ -2,7 +2,7 @@ {% set columns = [ {"name": "_fivetran_synced", "datatype": dbt.type_timestamp()}, - {"name": "_fivetran_active", "datatype": "boolean"}, + {"name": "_fivetran_active", "datatype": dbt.type_boolean()}, {"name": "created_by_id", "datatype": dbt.type_string()}, {"name": "created_date", "datatype": dbt.type_timestamp()}, {"name": "description", "datatype": dbt.type_string()}, @@ -29,6 +29,8 @@ {"name": "unit_price", "datatype": dbt.type_float()} ] %} +{{ salesforce_source.add_renamed_columns(columns) }} + {{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__opportunity_line_item_pass_through_columns')) }} {{ return(columns) }} diff --git a/macros/get_order_columns.sql b/macros/get_order_columns.sql index 96f857a..28a7c74 100644 --- a/macros/get_order_columns.sql +++ b/macros/get_order_columns.sql @@ -2,7 +2,7 @@ {% set columns = [ {"name": "_fivetran_synced", "datatype": dbt.type_timestamp()}, - {"name": "_fivetran_active", "datatype": "boolean"}, + {"name": "_fivetran_active", "datatype": dbt.type_boolean()}, {"name": "account_id", "datatype": dbt.type_string()}, {"name": "activated_by_id", "datatype": dbt.type_string()}, {"name": "activated_date", "datatype": dbt.type_timestamp()}, @@ -41,6 +41,8 @@ {"name": "type", "datatype": dbt.type_string()}, ] %} +{{ salesforce_source.add_renamed_columns(columns) }} + {{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__order_pass_through_columns')) }} {{ return(columns) }} diff --git a/macros/get_product_2_columns.sql b/macros/get_product_2_columns.sql index 3fcb77b..64a47f4 100644 --- a/macros/get_product_2_columns.sql +++ b/macros/get_product_2_columns.sql @@ -2,7 +2,7 @@ {% set columns = [ {"name": "_fivetran_synced", "datatype": dbt.type_timestamp()}, - {"name": "_fivetran_active", "datatype": "boolean"}, + {"name": "_fivetran_active", "datatype": dbt.type_boolean()}, {"name": "created_by_id", "datatype": dbt.type_string()}, {"name": "created_date", "datatype": dbt.type_timestamp()}, {"name": "description", "datatype": dbt.type_string()}, @@ -29,6 +29,8 @@ {"name": "revenue_schedule_type", "datatype": dbt.type_string()}, ] %} +{{ salesforce_source.add_renamed_columns(columns) }} + {{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__product_2_pass_through_columns')) }} {{ return(columns) }} diff --git a/macros/get_task_columns.sql b/macros/get_task_columns.sql index d062e6c..e1c7616 100644 --- a/macros/get_task_columns.sql +++ b/macros/get_task_columns.sql @@ -2,7 +2,7 @@ {% set columns = [ {"name": "_fivetran_synced", "datatype": dbt.type_timestamp()}, - {"name": "_fivetran_active", "datatype": "boolean"}, + {"name": "_fivetran_active", "datatype": dbt.type_boolean()}, {"name": "account_id", "datatype": dbt.type_string()}, {"name": "activity_date", "datatype": dbt.type_timestamp()}, {"name": "call_disposition", "datatype": dbt.type_string()}, @@ -33,6 +33,8 @@ {"name": "who_id", "datatype": dbt.type_string()} ] %} +{{ salesforce_source.add_renamed_columns(columns) }} + {{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__task_pass_through_columns')) }} {{ return(columns) }} diff --git a/macros/get_user_columns.sql b/macros/get_user_columns.sql index 25e4858..9299222 100644 --- a/macros/get_user_columns.sql +++ b/macros/get_user_columns.sql @@ -2,7 +2,7 @@ {% set columns = [ {"name": "_fivetran_deleted", "datatype": "boolean"}, - {"name": "_fivetran_active", "datatype": "boolean"}, + {"name": "_fivetran_active", "datatype": dbt.type_boolean()}, {"name": "_fivetran_synced", "datatype": dbt.type_timestamp()}, {"name": "account_id", "datatype": dbt.type_string()}, {"name": "alias", "datatype": dbt.type_string()}, @@ -34,6 +34,8 @@ {"name": "username", "datatype": dbt.type_string()}, ] %} +{{ salesforce_source.add_renamed_columns(columns) }} + {{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__user_pass_through_columns')) }} {{ return(columns) }} diff --git a/macros/get_user_role_columns.sql b/macros/get_user_role_columns.sql index 31ffe96..b0f562a 100644 --- a/macros/get_user_role_columns.sql +++ b/macros/get_user_role_columns.sql @@ -2,7 +2,7 @@ {% set columns = [ {"name": "_fivetran_deleted", "datatype": "boolean"}, - {"name": "_fivetran_active", "datatype": "boolean"}, + {"name": "_fivetran_active", "datatype": dbt.type_boolean()}, {"name": "_fivetran_synced", "datatype": dbt.type_timestamp()}, {"name": "developer_name", "datatype": dbt.type_string()}, {"name": "id", "datatype": dbt.type_string()}, @@ -12,6 +12,8 @@ {"name": "rollup_description", "datatype": dbt.type_string()} ] %} +{{ salesforce_source.add_renamed_columns(columns) }} + {{ fivetran_utils.add_pass_through_columns(columns, var('salesforce__user_role_pass_through_columns')) }} {{ return(columns) }} diff --git a/models/salesforce/stg_salesforce__account.sql b/models/salesforce/stg_salesforce__account.sql index a796894..bc185df 100644 --- a/models/salesforce/stg_salesforce__account.sql +++ b/models/salesforce/stg_salesforce__account.sql @@ -1,11 +1,13 @@ +{% set account_column_list = get_account_columns() -%} +{% set account_dict = column_list_to_dict(account_column_list) -%} + with fields as ( select - {{ fivetran_utils.fill_staging_columns( source_columns=adapter.get_columns_in_relation(source('salesforce','account')), - staging_columns=get_account_columns() + staging_columns=account_column_list ) }} @@ -13,45 +15,44 @@ with fields as ( ), final as ( - - select + select cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced, - account_number, - account_source, - cast(annual_revenue as {{ dbt.type_numeric() }}) as annual_revenue, - billing_city, - billing_country, - billing_postal_code, - billing_state, - billing_state_code, - billing_street, - description as account_description, - id as account_id, - industry, - is_deleted, - cast(last_activity_date as {{ dbt.type_timestamp() }}) as last_activity_date, - cast(last_referenced_date as {{ dbt.type_timestamp() }}) as last_referenced_date, - cast(last_viewed_date as {{ dbt.type_timestamp() }}) as last_viewed_date, - master_record_id, - name as account_name, - number_of_employees, - owner_id, - ownership, - parent_id, - rating, - record_type_id, - shipping_city, - shipping_country, - shipping_country_code, - shipping_postal_code, - shipping_state, - shipping_state_code, - shipping_street, - type, - website - + {{ salesforce_source.coalesce_rename("account_number", account_dict) }}, + {{ salesforce_source.coalesce_rename("account_source", account_dict) }}, + {{ salesforce_source.coalesce_rename("annual_revenue", account_dict, datatype=dbt.type_numeric()) }}, + {{ salesforce_source.coalesce_rename("billing_city", account_dict) }}, + {{ salesforce_source.coalesce_rename("billing_country", account_dict) }}, + {{ salesforce_source.coalesce_rename("billing_postal_code", account_dict) }}, + {{ salesforce_source.coalesce_rename("billing_state", account_dict) }}, + {{ salesforce_source.coalesce_rename("billing_state_code", account_dict) }}, + {{ salesforce_source.coalesce_rename("billing_street", account_dict) }}, + {{ salesforce_source.coalesce_rename("description", account_dict, alias="account_description" ) }}, + {{ salesforce_source.coalesce_rename("id", account_dict, alias="account_id") }}, + {{ salesforce_source.coalesce_rename("industry", account_dict) }}, + {{ salesforce_source.coalesce_rename("is_deleted", account_dict) }}, + {{ salesforce_source.coalesce_rename("last_activity_date", account_dict) }}, + {{ salesforce_source.coalesce_rename("last_referenced_date", account_dict) }}, + {{ salesforce_source.coalesce_rename("last_viewed_date", account_dict) }}, + {{ salesforce_source.coalesce_rename("master_record_id", account_dict) }}, + {{ salesforce_source.coalesce_rename("name", account_dict, alias="account_name" ) }}, + {{ salesforce_source.coalesce_rename("number_of_employees", account_dict) }}, + {{ salesforce_source.coalesce_rename("owner_id", account_dict) }}, + {{ salesforce_source.coalesce_rename("ownership", account_dict) }}, + {{ salesforce_source.coalesce_rename("parent_id", account_dict) }}, + {{ salesforce_source.coalesce_rename("rating", account_dict) }}, + {{ salesforce_source.coalesce_rename("record_type_id", account_dict) }}, + {{ salesforce_source.coalesce_rename("shipping_city", account_dict) }}, + {{ salesforce_source.coalesce_rename("shipping_country", account_dict) }}, + {{ salesforce_source.coalesce_rename("shipping_country_code", account_dict) }}, + {{ salesforce_source.coalesce_rename("shipping_postal_code", account_dict) }}, + {{ salesforce_source.coalesce_rename("shipping_state", account_dict) }}, + {{ salesforce_source.coalesce_rename("shipping_state_code", account_dict) }}, + {{ salesforce_source.coalesce_rename("shipping_street", account_dict) }}, + {{ salesforce_source.coalesce_rename("type", account_dict) }}, + {{ salesforce_source.coalesce_rename("website", account_dict) }} + {{ fivetran_utils.fill_pass_through_columns('salesforce__account_pass_through_columns') }} - + from fields where coalesce(_fivetran_active, true) ) diff --git a/models/salesforce/stg_salesforce__contact.sql b/models/salesforce/stg_salesforce__contact.sql index c48a335..4556b76 100644 --- a/models/salesforce/stg_salesforce__contact.sql +++ b/models/salesforce/stg_salesforce__contact.sql @@ -1,3 +1,5 @@ +{% set contact_column_list = get_contact_columns() -%} +{% set contact_dict = column_list_to_dict(contact_column_list) -%} with fields as ( @@ -5,7 +7,7 @@ with fields as ( {{ fivetran_utils.fill_staging_columns( source_columns=adapter.get_columns_in_relation(source('salesforce','contact')), - staging_columns=get_contact_columns() + staging_columns=contact_column_list ) }} @@ -16,36 +18,36 @@ final as ( select cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced, - id as contact_id, - account_id, - department, - description as contact_description, - email, - first_name, - home_phone, - individual_id, - is_deleted, - cast(last_activity_date as {{ dbt.type_timestamp() }}) as last_activity_date, - last_modified_by_id, - last_modified_date, - last_name, - last_referenced_date, - cast(last_viewed_date as {{ dbt.type_timestamp() }}) as last_viewed_date, - lead_source, - mailing_city, - mailing_country, - mailing_country_code, - mailing_postal_code, - mailing_state, - mailing_state_code, - mailing_street, - master_record_id, - mobile_phone, - name as contact_name, - owner_id, - phone, - reports_to_id, - title + {{ salesforce_source.coalesce_rename("id", contact_dict, alias="contact_id") }}, + {{ salesforce_source.coalesce_rename("account_id", contact_dict) }}, + {{ salesforce_source.coalesce_rename("department", contact_dict) }}, + {{ salesforce_source.coalesce_rename("description", contact_dict, alias="contact_description") }}, + {{ salesforce_source.coalesce_rename("email", contact_dict) }}, + {{ salesforce_source.coalesce_rename("first_name", contact_dict) }}, + {{ salesforce_source.coalesce_rename("home_phone", contact_dict) }}, + {{ salesforce_source.coalesce_rename("individual_id", contact_dict) }}, + {{ salesforce_source.coalesce_rename("is_deleted", contact_dict) }}, + {{ salesforce_source.coalesce_rename("last_activity_date", contact_dict) }}, + {{ salesforce_source.coalesce_rename("last_modified_by_id", contact_dict) }}, + {{ salesforce_source.coalesce_rename("last_modified_date", contact_dict) }}, + {{ salesforce_source.coalesce_rename("last_name", contact_dict) }}, + {{ salesforce_source.coalesce_rename("last_referenced_date", contact_dict) }}, + {{ salesforce_source.coalesce_rename("last_viewed_date", contact_dict) }}, + {{ salesforce_source.coalesce_rename("lead_source", contact_dict) }}, + {{ salesforce_source.coalesce_rename("mailing_city", contact_dict) }}, + {{ salesforce_source.coalesce_rename("mailing_country", contact_dict) }}, + {{ salesforce_source.coalesce_rename("mailing_country_code", contact_dict) }}, + {{ salesforce_source.coalesce_rename("mailing_postal_code", contact_dict) }}, + {{ salesforce_source.coalesce_rename("mailing_state", contact_dict) }}, + {{ salesforce_source.coalesce_rename("mailing_state_code", contact_dict) }}, + {{ salesforce_source.coalesce_rename("mailing_street", contact_dict) }}, + {{ salesforce_source.coalesce_rename("master_record_id", contact_dict) }}, + {{ salesforce_source.coalesce_rename("mobile_phone", contact_dict) }}, + {{ salesforce_source.coalesce_rename("name", contact_dict, alias="contact_name") }}, + {{ salesforce_source.coalesce_rename("owner_id", contact_dict) }}, + {{ salesforce_source.coalesce_rename("phone", contact_dict) }}, + {{ salesforce_source.coalesce_rename("reports_to_id", contact_dict) }}, + {{ salesforce_source.coalesce_rename("title", contact_dict) }} {{ fivetran_utils.fill_pass_through_columns('salesforce__contact_pass_through_columns') }} diff --git a/models/salesforce/stg_salesforce__event.sql b/models/salesforce/stg_salesforce__event.sql index 2ca794e..ea39dab 100644 --- a/models/salesforce/stg_salesforce__event.sql +++ b/models/salesforce/stg_salesforce__event.sql @@ -1,13 +1,16 @@ --To disable this model, set the salesforce__event_enabled variable within your dbt_project.yml file to False. {{ config(enabled=var('salesforce__event_enabled', True)) }} +{% set event_column_list = get_event_columns() -%} +{% set event_dict = column_list_to_dict(event_column_list) -%} + with fields as ( select {{ fivetran_utils.fill_staging_columns( source_columns=adapter.get_columns_in_relation(source('salesforce','event')), - staging_columns=get_event_columns() + staging_columns=event_column_list ) }} @@ -18,33 +21,33 @@ final as ( select cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced, - id as event_id, - account_id, - cast(activity_date as {{ dbt.type_timestamp() }}) as activity_date, - cast(activity_date_time as {{ dbt.type_timestamp() }}) as activity_date_time, - created_by_id, - cast(created_date as {{ dbt.type_timestamp() }}) as created_date, - description as event_description, - cast(end_date as {{ dbt.type_timestamp() }}) as end_date, - cast(end_date_time as {{ dbt.type_timestamp() }}) as end_date_time, - event_subtype, - group_event_type, - is_archived, - is_child, - is_deleted, - is_group_event, - is_recurrence, - last_modified_by_id, - cast(last_modified_date as {{ dbt.type_timestamp() }}) as last_modified_date, - location, - owner_id, - cast(start_date_time as {{ dbt.type_timestamp() }}) as start_date_time, - subject, - type, - what_count, - what_id, - who_count, - who_id + {{ salesforce_source.coalesce_rename("id", event_dict, alias="event_id") }}, + {{ salesforce_source.coalesce_rename("account_id", event_dict) }}, + {{ salesforce_source.coalesce_rename("activity_date", event_dict) }}, + {{ salesforce_source.coalesce_rename("activity_date_time", event_dict) }}, + {{ salesforce_source.coalesce_rename("created_by_id", event_dict) }}, + {{ salesforce_source.coalesce_rename("created_date", event_dict) }}, + {{ salesforce_source.coalesce_rename("description", event_dict, alias="event_description") }}, + {{ salesforce_source.coalesce_rename("end_date", event_dict) }}, + {{ salesforce_source.coalesce_rename("end_date_time", event_dict) }}, + {{ salesforce_source.coalesce_rename("event_subtype", event_dict) }}, + {{ salesforce_source.coalesce_rename("group_event_type", event_dict) }}, + {{ salesforce_source.coalesce_rename("is_archived", event_dict) }}, + {{ salesforce_source.coalesce_rename("is_child", event_dict) }}, + {{ salesforce_source.coalesce_rename("is_deleted", event_dict) }}, + {{ salesforce_source.coalesce_rename("is_group_event", event_dict) }}, + {{ salesforce_source.coalesce_rename("is_recurrence", event_dict) }}, + {{ salesforce_source.coalesce_rename("last_modified_by_id", event_dict) }}, + {{ salesforce_source.coalesce_rename("last_modified_date", event_dict) }}, + {{ salesforce_source.coalesce_rename("location", event_dict) }}, + {{ salesforce_source.coalesce_rename("owner_id", event_dict) }}, + {{ salesforce_source.coalesce_rename("start_date_time", event_dict) }}, + {{ salesforce_source.coalesce_rename("subject", event_dict) }}, + {{ salesforce_source.coalesce_rename("type", event_dict) }}, + {{ salesforce_source.coalesce_rename("what_count", event_dict) }}, + {{ salesforce_source.coalesce_rename("what_id", event_dict) }}, + {{ salesforce_source.coalesce_rename("who_count", event_dict) }}, + {{ salesforce_source.coalesce_rename("who_id", event_dict) }} {{ fivetran_utils.fill_pass_through_columns('salesforce__event_pass_through_columns') }} diff --git a/models/salesforce/stg_salesforce__lead.sql b/models/salesforce/stg_salesforce__lead.sql index 0f97da0..66c28de 100644 --- a/models/salesforce/stg_salesforce__lead.sql +++ b/models/salesforce/stg_salesforce__lead.sql @@ -1,13 +1,16 @@ --To disable this model, set the salesforce__lead_enabled within your dbt_project.yml file to False. {{ config(enabled=var('salesforce__lead_enabled', True)) }} +{% set lead_column_list = get_lead_columns() -%} +{% set lead_dict = column_list_to_dict(lead_column_list) -%} + with fields as ( select {{ fivetran_utils.fill_staging_columns( source_columns=adapter.get_columns_in_relation(source('salesforce','lead')), - staging_columns=get_lead_columns() + staging_columns=lead_column_list ) }} @@ -18,49 +21,49 @@ final as ( select cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced, - id as lead_id, - annual_revenue, - city, - company, - converted_account_id, - converted_contact_id, - cast(converted_date as {{ dbt.type_timestamp() }}) as converted_date, - converted_opportunity_id, - country, - country_code, - created_by_id, - cast(created_date as {{ dbt.type_timestamp() }}) as created_date, - description as lead_description, - email, - cast(email_bounced_date as {{ dbt.type_timestamp() }}) as email_bounced_date, - email_bounced_reason, - first_name, - has_opted_out_of_email, - individual_id, - industry, - is_converted, - is_deleted, - is_unread_by_owner, - cast(last_activity_date as {{ dbt.type_timestamp() }}) as last_activity_date, - last_modified_by_id, - cast(last_modified_date as {{ dbt.type_timestamp() }}) as last_modified_date, - last_name, - cast(last_referenced_date as {{ dbt.type_timestamp() }}) as last_referenced_date, - cast(last_viewed_date as {{ dbt.type_timestamp() }}) as last_viewed_date, - lead_source, - master_record_id, - mobile_phone, - name as lead_name, - number_of_employees, - owner_id, - phone, - postal_code, - state, - state_code, - status, - street, - title, - website + {{ salesforce_source.coalesce_rename("id", lead_dict, alias="lead_id") }}, + {{ salesforce_source.coalesce_rename("annual_revenue", lead_dict, datatype=dbt.type_numeric()) }}, + {{ salesforce_source.coalesce_rename("city", lead_dict) }}, + {{ salesforce_source.coalesce_rename("company", lead_dict) }}, + {{ salesforce_source.coalesce_rename("converted_account_id", lead_dict) }}, + {{ salesforce_source.coalesce_rename("converted_contact_id", lead_dict) }}, + {{ salesforce_source.coalesce_rename("converted_date", lead_dict) }}, + {{ salesforce_source.coalesce_rename("converted_opportunity_id", lead_dict) }}, + {{ salesforce_source.coalesce_rename("country", lead_dict) }}, + {{ salesforce_source.coalesce_rename("country_code", lead_dict) }}, + {{ salesforce_source.coalesce_rename("created_by_id", lead_dict) }}, + {{ salesforce_source.coalesce_rename("created_date", lead_dict) }}, + {{ salesforce_source.coalesce_rename("description", lead_dict, alias="lead_description") }}, + {{ salesforce_source.coalesce_rename("email", lead_dict) }}, + {{ salesforce_source.coalesce_rename("email_bounced_date", lead_dict) }}, + {{ salesforce_source.coalesce_rename("email_bounced_reason", lead_dict) }}, + {{ salesforce_source.coalesce_rename("first_name", lead_dict) }}, + {{ salesforce_source.coalesce_rename("has_opted_out_of_email", lead_dict) }}, + {{ salesforce_source.coalesce_rename("individual_id", lead_dict) }}, + {{ salesforce_source.coalesce_rename("industry", lead_dict) }}, + {{ salesforce_source.coalesce_rename("is_converted", lead_dict) }}, + {{ salesforce_source.coalesce_rename("is_deleted", lead_dict) }}, + {{ salesforce_source.coalesce_rename("is_unread_by_owner", lead_dict) }}, + {{ salesforce_source.coalesce_rename("last_activity_date", lead_dict) }}, + {{ salesforce_source.coalesce_rename("last_modified_by_id", lead_dict) }}, + {{ salesforce_source.coalesce_rename("last_modified_date", lead_dict) }}, + {{ salesforce_source.coalesce_rename("last_name", lead_dict) }}, + {{ salesforce_source.coalesce_rename("last_referenced_date", lead_dict) }}, + {{ salesforce_source.coalesce_rename("last_viewed_date", lead_dict) }}, + {{ salesforce_source.coalesce_rename("lead_source", lead_dict) }}, + {{ salesforce_source.coalesce_rename("master_record_id", lead_dict) }}, + {{ salesforce_source.coalesce_rename("mobile_phone", lead_dict) }}, + {{ salesforce_source.coalesce_rename("name", lead_dict, alias="lead_name") }}, + {{ salesforce_source.coalesce_rename("number_of_employees", lead_dict) }}, + {{ salesforce_source.coalesce_rename("owner_id", lead_dict) }}, + {{ salesforce_source.coalesce_rename("phone", lead_dict) }}, + {{ salesforce_source.coalesce_rename("postal_code", lead_dict) }}, + {{ salesforce_source.coalesce_rename("state", lead_dict) }}, + {{ salesforce_source.coalesce_rename("state_code", lead_dict) }}, + {{ salesforce_source.coalesce_rename("status", lead_dict) }}, + {{ salesforce_source.coalesce_rename("street", lead_dict) }}, + {{ salesforce_source.coalesce_rename("title", lead_dict) }}, + {{ salesforce_source.coalesce_rename("website", lead_dict) }} {{ fivetran_utils.fill_pass_through_columns('salesforce__lead_pass_through_columns') }} diff --git a/models/salesforce/stg_salesforce__opportunity.sql b/models/salesforce/stg_salesforce__opportunity.sql index e2a87f2..0eab7ba 100644 --- a/models/salesforce/stg_salesforce__opportunity.sql +++ b/models/salesforce/stg_salesforce__opportunity.sql @@ -1,3 +1,6 @@ +{% set opportunity_column_list = get_opportunity_columns() -%} +{% set opportunity_dict = column_list_to_dict(opportunity_column_list) -%} + with fields as ( select @@ -5,7 +8,7 @@ with fields as ( {{ fivetran_utils.fill_staging_columns( source_columns=adapter.get_columns_in_relation(source('salesforce','opportunity')), - staging_columns=get_opportunity_columns() + staging_columns=opportunity_column_list ) }} @@ -16,37 +19,37 @@ final as ( select cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced, - account_id, - cast(amount as {{ dbt.type_numeric() }}) as amount, - campaign_id, - cast(close_date as {{ dbt.type_timestamp() }}) as close_date, - cast(created_date as {{ dbt.type_timestamp() }}) as created_date, - description as opportunity_description, - cast(expected_revenue as {{ dbt.type_numeric() }}) as expected_revenue, - fiscal, - fiscal_quarter, - fiscal_year, - forecast_category, - forecast_category_name, - has_open_activity, - has_opportunity_line_item, - has_overdue_task, - id as opportunity_id, - is_closed, - is_deleted, - is_won, - cast(last_activity_date as {{ dbt.type_timestamp() }}) as last_activity_date, - cast(last_referenced_date as {{ dbt.type_timestamp() }}) as last_referenced_date, - cast(last_viewed_date as {{ dbt.type_timestamp() }}) as last_viewed_date, - lead_source, - name as opportunity_name, - next_step, - owner_id, - probability, - record_type_id, - stage_name, - synced_quote_id, - type + {{ salesforce_source.coalesce_rename("account_id", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("amount", opportunity_dict, datatype=dbt.type_numeric()) }}, + {{ salesforce_source.coalesce_rename("campaign_id", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("close_date", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("created_date", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("description", opportunity_dict, alias="opportunity_description") }}, + {{ salesforce_source.coalesce_rename("expected_revenue", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("fiscal", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("fiscal_quarter", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("fiscal_year", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("forecast_category", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("forecast_category_name", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("has_open_activity", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("has_opportunity_line_item", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("has_overdue_task", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("id", opportunity_dict, alias="opportunity_id") }}, + {{ salesforce_source.coalesce_rename("is_closed", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("is_deleted", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("is_won", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("last_activity_date", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("last_referenced_date", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("last_viewed_date", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("lead_source", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("name", opportunity_dict, alias="opportunity_name") }}, + {{ salesforce_source.coalesce_rename("next_step", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("owner_id", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("probability", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("record_type_id", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("stage_name", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("synced_quote_id", opportunity_dict) }}, + {{ salesforce_source.coalesce_rename("type", opportunity_dict) }} {{ fivetran_utils.fill_pass_through_columns('salesforce__opportunity_pass_through_columns') }} diff --git a/models/salesforce/stg_salesforce__opportunity_line_item.sql b/models/salesforce/stg_salesforce__opportunity_line_item.sql index 10ce16e..ee8b9c0 100644 --- a/models/salesforce/stg_salesforce__opportunity_line_item.sql +++ b/models/salesforce/stg_salesforce__opportunity_line_item.sql @@ -1,13 +1,16 @@ --To disable this model, set the salesforce__opportunity_line_item_enabled variable within your dbt_project.yml file to False. {{ config(enabled=var('salesforce__opportunity_line_item_enabled', True)) }} +{% set opportunity_line_item_column_list = get_opportunity_line_item_columns() -%} +{% set opportunity_line_item_dict = column_list_to_dict(opportunity_line_item_column_list) -%} + with fields as ( select {{ fivetran_utils.fill_staging_columns( source_columns=adapter.get_columns_in_relation(source('salesforce','opportunity_line_item')), - staging_columns=get_opportunity_line_item_columns() + staging_columns=opportunity_line_item_column_list ) }} @@ -18,30 +21,30 @@ final as ( select cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced, - id as opportunity_line_item_id, - created_by_id, - cast(created_date as {{ dbt.type_timestamp() }}) as created_date, - description as opportunity_line_item_description, - discount, - has_quantity_schedule, - has_revenue_schedule, - has_schedule, - is_deleted, - last_modified_by_id, - cast(last_modified_date as {{ dbt.type_timestamp() }}) as last_modified_date, - cast(last_referenced_date as {{ dbt.type_timestamp() }}) as last_referenced_date, - cast(last_viewed_date as {{ dbt.type_timestamp() }}) as last_viewed_date, - list_price, - name as opportunity_line_item_name, - opportunity_id, - pricebook_entry_id, - product_2_id, - product_code, - quantity, - cast(service_date as {{ dbt.type_timestamp() }}) as service_date, - sort_order, - total_price, - unit_price + {{ salesforce_source.coalesce_rename("id", opportunity_line_item_dict, alias="opportunity_line_item_id") }}, + {{ salesforce_source.coalesce_rename("created_by_id", opportunity_line_item_dict) }}, + {{ salesforce_source.coalesce_rename("created_date", opportunity_line_item_dict) }}, + {{ salesforce_source.coalesce_rename("description", opportunity_line_item_dict, alias="opportunity_line_item_description") }}, + {{ salesforce_source.coalesce_rename("discount", opportunity_line_item_dict) }}, + {{ salesforce_source.coalesce_rename("has_quantity_schedule", opportunity_line_item_dict) }}, + {{ salesforce_source.coalesce_rename("has_revenue_schedule", opportunity_line_item_dict) }}, + {{ salesforce_source.coalesce_rename("has_schedule", opportunity_line_item_dict) }}, + {{ salesforce_source.coalesce_rename("is_deleted", opportunity_line_item_dict) }}, + {{ salesforce_source.coalesce_rename("last_modified_by_id", opportunity_line_item_dict) }}, + {{ salesforce_source.coalesce_rename("last_modified_date", opportunity_line_item_dict) }}, + {{ salesforce_source.coalesce_rename("last_referenced_date", opportunity_line_item_dict) }}, + {{ salesforce_source.coalesce_rename("last_viewed_date", opportunity_line_item_dict) }}, + {{ salesforce_source.coalesce_rename("list_price", opportunity_line_item_dict, datatype=dbt.type_numeric()) }}, + {{ salesforce_source.coalesce_rename("name", opportunity_line_item_dict, alias="opportunity_line_item_name") }}, + {{ salesforce_source.coalesce_rename("opportunity_id", opportunity_line_item_dict) }}, + {{ salesforce_source.coalesce_rename("pricebook_entry_id", opportunity_line_item_dict) }}, + {{ salesforce_source.coalesce_rename("product_2_id", opportunity_line_item_dict) }}, + {{ salesforce_source.coalesce_rename("product_code", opportunity_line_item_dict) }}, + {{ salesforce_source.coalesce_rename("quantity", opportunity_line_item_dict) }}, + {{ salesforce_source.coalesce_rename("service_date", opportunity_line_item_dict) }}, + {{ salesforce_source.coalesce_rename("sort_order", opportunity_line_item_dict) }}, + {{ salesforce_source.coalesce_rename("total_price", opportunity_line_item_dict, datatype=dbt.type_numeric()) }}, + {{ salesforce_source.coalesce_rename("unit_price", opportunity_line_item_dict, datatype=dbt.type_numeric()) }} {{ fivetran_utils.fill_pass_through_columns('salesforce__opportunity_line_item_pass_through_columns') }} diff --git a/models/salesforce/stg_salesforce__order.sql b/models/salesforce/stg_salesforce__order.sql index 63564d0..35714cf 100644 --- a/models/salesforce/stg_salesforce__order.sql +++ b/models/salesforce/stg_salesforce__order.sql @@ -1,13 +1,16 @@ --To disable this model, set the salesforce__order_enabled within your dbt_project.yml file to False. {{ config(enabled=var('salesforce__order_enabled', True)) }} +{% set order_column_list = get_order_columns() -%} +{% set order_dict = column_list_to_dict(order_column_list) -%} + with fields as ( select {{ fivetran_utils.fill_staging_columns( source_columns=adapter.get_columns_in_relation(source('salesforce','order')), - staging_columns=get_order_columns() + staging_columns=order_column_list ) }} @@ -18,42 +21,42 @@ final as ( select cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced, - id as order_id, - account_id, - activated_by_id, - cast(activated_date as {{ dbt.type_timestamp() }}) as activated_date, - billing_city, - billing_country, - billing_country_code, - billing_postal_code, - billing_state, - billing_state_code, - billing_street, - contract_id, - created_by_id, - created_date, - description as order_description, - cast(end_date as {{ dbt.type_timestamp() }}) as end_date, - is_deleted, - last_modified_by_id, - cast(last_modified_date as {{ dbt.type_timestamp() }}) as last_modified_date, - cast(last_referenced_date as {{ dbt.type_timestamp() }}) as last_referenced_date, - cast(last_viewed_date as {{ dbt.type_timestamp() }}) as last_viewed_date, - opportunity_id, - order_number, - original_order_id, - owner_id, - pricebook_2_id, - shipping_city, - shipping_country, - shipping_country_code, - shipping_postal_code, - shipping_state, - shipping_state_code, - shipping_street, - status, - total_amount, - type + {{ salesforce_source.coalesce_rename("id", order_dict, alias="order_id") }}, + {{ salesforce_source.coalesce_rename("account_id", order_dict) }}, + {{ salesforce_source.coalesce_rename("activated_by_id", order_dict) }}, + {{ salesforce_source.coalesce_rename("activated_date", order_dict) }}, + {{ salesforce_source.coalesce_rename("billing_city", order_dict) }}, + {{ salesforce_source.coalesce_rename("billing_country", order_dict) }}, + {{ salesforce_source.coalesce_rename("billing_country_code", order_dict) }}, + {{ salesforce_source.coalesce_rename("billing_postal_code", order_dict) }}, + {{ salesforce_source.coalesce_rename("billing_state", order_dict) }}, + {{ salesforce_source.coalesce_rename("billing_state_code", order_dict) }}, + {{ salesforce_source.coalesce_rename("billing_street", order_dict) }}, + {{ salesforce_source.coalesce_rename("contract_id", order_dict) }}, + {{ salesforce_source.coalesce_rename("created_by_id", order_dict) }}, + {{ salesforce_source.coalesce_rename("created_date", order_dict) }}, + {{ salesforce_source.coalesce_rename("description", order_dict, alias="order_description") }}, + {{ salesforce_source.coalesce_rename("end_date", order_dict) }}, + {{ salesforce_source.coalesce_rename("is_deleted", order_dict) }}, + {{ salesforce_source.coalesce_rename("last_modified_by_id", order_dict) }}, + {{ salesforce_source.coalesce_rename("last_modified_date", order_dict) }}, + {{ salesforce_source.coalesce_rename("last_referenced_date", order_dict) }}, + {{ salesforce_source.coalesce_rename("last_viewed_date", order_dict) }}, + {{ salesforce_source.coalesce_rename("opportunity_id", order_dict) }}, + {{ salesforce_source.coalesce_rename("order_number", order_dict) }}, + {{ salesforce_source.coalesce_rename("original_order_id", order_dict) }}, + {{ salesforce_source.coalesce_rename("owner_id", order_dict) }}, + {{ salesforce_source.coalesce_rename("pricebook_2_id", order_dict) }}, + {{ salesforce_source.coalesce_rename("shipping_city", order_dict) }}, + {{ salesforce_source.coalesce_rename("shipping_country", order_dict) }}, + {{ salesforce_source.coalesce_rename("shipping_country_code", order_dict) }}, + {{ salesforce_source.coalesce_rename("shipping_postal_code", order_dict) }}, + {{ salesforce_source.coalesce_rename("shipping_state", order_dict) }}, + {{ salesforce_source.coalesce_rename("shipping_state_code", order_dict) }}, + {{ salesforce_source.coalesce_rename("shipping_street", order_dict) }}, + {{ salesforce_source.coalesce_rename("status", order_dict) }}, + {{ salesforce_source.coalesce_rename("total_amount", order_dict, datatype=dbt.type_numeric()) }}, + {{ salesforce_source.coalesce_rename("type", order_dict) }} {{ fivetran_utils.fill_pass_through_columns('salesforce__order_pass_through_columns') }} diff --git a/models/salesforce/stg_salesforce__product_2.sql b/models/salesforce/stg_salesforce__product_2.sql index c99aa90..6e227ab 100644 --- a/models/salesforce/stg_salesforce__product_2.sql +++ b/models/salesforce/stg_salesforce__product_2.sql @@ -1,13 +1,16 @@ --To disable this model, set the salesforce__product_2_enabled variable within your dbt_project.yml file to False. {{ config(enabled=var('salesforce__product_2_enabled', True)) }} +{% set product_2_column_list = get_product_2_columns() -%} +{% set product_2_dict = column_list_to_dict(product_2_column_list) -%} + with fields as ( select {{ fivetran_utils.fill_staging_columns( source_columns=adapter.get_columns_in_relation(source('salesforce','product_2')), - staging_columns=get_product_2_columns() + staging_columns=product_2_column_list ) }} @@ -18,30 +21,30 @@ final as ( select cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced, - id as product_2_id, - created_by_id, - cast(created_date as {{ dbt.type_timestamp() }}) as created_date, - description as product_2_description, - display_url, - external_id, - family, - is_active, - is_archived, - is_deleted, - last_modified_by_id, - cast(last_modified_date as {{ dbt.type_timestamp() }}) as last_modified_date, - cast(last_referenced_date as {{ dbt.type_timestamp() }}) as last_referenced_date, - cast(last_viewed_date as {{ dbt.type_timestamp() }}) as last_viewed_date, - name as product_2_name, - number_of_quantity_installments, - number_of_revenue_installments, - product_code, - quantity_installment_period, - quantity_schedule_type, - quantity_unit_of_measure, - record_type_id, - revenue_installment_period, - revenue_schedule_type + {{ salesforce_source.coalesce_rename("id", product_2_dict, alias="product_2_id") }}, + {{ salesforce_source.coalesce_rename("created_by_id", product_2_dict) }}, + {{ salesforce_source.coalesce_rename("created_date", product_2_dict) }}, + {{ salesforce_source.coalesce_rename("description", product_2_dict, alias="product_2_description") }}, + {{ salesforce_source.coalesce_rename("display_url", product_2_dict) }}, + {{ salesforce_source.coalesce_rename("external_id", product_2_dict) }}, + {{ salesforce_source.coalesce_rename("family", product_2_dict) }}, + {{ salesforce_source.coalesce_rename("is_active", product_2_dict) }}, + {{ salesforce_source.coalesce_rename("is_archived", product_2_dict) }}, + {{ salesforce_source.coalesce_rename("is_deleted", product_2_dict) }}, + {{ salesforce_source.coalesce_rename("last_modified_by_id", product_2_dict) }}, + {{ salesforce_source.coalesce_rename("last_modified_date", product_2_dict) }}, + {{ salesforce_source.coalesce_rename("last_referenced_date", product_2_dict) }}, + {{ salesforce_source.coalesce_rename("last_viewed_date", product_2_dict) }}, + {{ salesforce_source.coalesce_rename("name", product_2_dict, alias="product_2_name") }}, + {{ salesforce_source.coalesce_rename("number_of_quantity_installments", product_2_dict) }}, + {{ salesforce_source.coalesce_rename("number_of_revenue_installments", product_2_dict) }}, + {{ salesforce_source.coalesce_rename("product_code", product_2_dict) }}, + {{ salesforce_source.coalesce_rename("quantity_installment_period", product_2_dict) }}, + {{ salesforce_source.coalesce_rename("quantity_schedule_type", product_2_dict) }}, + {{ salesforce_source.coalesce_rename("quantity_unit_of_measure", product_2_dict) }}, + {{ salesforce_source.coalesce_rename("record_type_id", product_2_dict) }}, + {{ salesforce_source.coalesce_rename("revenue_installment_period", product_2_dict) }}, + {{ salesforce_source.coalesce_rename("revenue_schedule_type", product_2_dict) }} {{ fivetran_utils.fill_pass_through_columns('salesforce__product_2_pass_through_columns') }} diff --git a/models/salesforce/stg_salesforce__task.sql b/models/salesforce/stg_salesforce__task.sql index cf7654b..6303349 100644 --- a/models/salesforce/stg_salesforce__task.sql +++ b/models/salesforce/stg_salesforce__task.sql @@ -1,13 +1,16 @@ --To disable this model, set the salesforce__task_enabled variable within your dbt_project.yml file to False. {{ config(enabled=var('salesforce__task_enabled', True)) }} +{% set task_column_list = get_task_columns() -%} +{% set task_dict = column_list_to_dict(task_column_list) -%} + with fields as ( select {{ fivetran_utils.fill_staging_columns( source_columns=adapter.get_columns_in_relation(source('salesforce','task')), - staging_columns=get_task_columns() + staging_columns=task_column_list ) }} @@ -18,34 +21,34 @@ final as ( select cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced, - id as task_id, - account_id, - cast(activity_date as {{ dbt.type_timestamp() }}) as activity_date, - call_disposition, - call_duration_in_seconds, - call_object, - call_type, - cast(completed_date_time as {{ dbt.type_timestamp() }}) as completed_date_time, - created_by_id, - cast(created_date as {{ dbt.type_timestamp() }}) as created_date, - description as task_description, - is_archived, - is_closed, - is_deleted, - is_high_priority, - last_modified_by_id, - cast(last_modified_date as {{ dbt.type_timestamp() }}) as last_modified_date, - owner_id, - priority, - record_type_id, - status, - subject, - task_subtype, - type, - what_count, - what_id, - who_count, - who_id + {{ salesforce_source.coalesce_rename("id", task_dict, alias="task_id") }}, + {{ salesforce_source.coalesce_rename("account_id", task_dict) }}, + {{ salesforce_source.coalesce_rename("activity_date", task_dict) }}, + {{ salesforce_source.coalesce_rename("call_disposition", task_dict) }}, + {{ salesforce_source.coalesce_rename("call_duration_in_seconds", task_dict) }}, + {{ salesforce_source.coalesce_rename("call_object", task_dict) }}, + {{ salesforce_source.coalesce_rename("call_type", task_dict) }}, + {{ salesforce_source.coalesce_rename("completed_date_time", task_dict) }}, + {{ salesforce_source.coalesce_rename("created_by_id", task_dict) }}, + {{ salesforce_source.coalesce_rename("created_date", task_dict) }}, + {{ salesforce_source.coalesce_rename("description", task_dict, alias="task_description") }}, + {{ salesforce_source.coalesce_rename("is_archived", task_dict) }}, + {{ salesforce_source.coalesce_rename("is_closed", task_dict) }}, + {{ salesforce_source.coalesce_rename("is_deleted", task_dict) }}, + {{ salesforce_source.coalesce_rename("is_high_priority", task_dict) }}, + {{ salesforce_source.coalesce_rename("last_modified_by_id", task_dict) }}, + {{ salesforce_source.coalesce_rename("last_modified_date", task_dict) }}, + {{ salesforce_source.coalesce_rename("owner_id", task_dict) }}, + {{ salesforce_source.coalesce_rename("priority", task_dict) }}, + {{ salesforce_source.coalesce_rename("record_type_id", task_dict) }}, + {{ salesforce_source.coalesce_rename("status", task_dict) }}, + {{ salesforce_source.coalesce_rename("subject", task_dict) }}, + {{ salesforce_source.coalesce_rename("task_subtype", task_dict) }}, + {{ salesforce_source.coalesce_rename("type", task_dict) }}, + {{ salesforce_source.coalesce_rename("what_count", task_dict) }}, + {{ salesforce_source.coalesce_rename("what_id", task_dict) }}, + {{ salesforce_source.coalesce_rename("who_count", task_dict) }}, + {{ salesforce_source.coalesce_rename("who_id", task_dict) }} {{ fivetran_utils.fill_pass_through_columns('salesforce__task_pass_through_columns') }} diff --git a/models/salesforce/stg_salesforce__user.sql b/models/salesforce/stg_salesforce__user.sql index 6ea6346..312afd9 100644 --- a/models/salesforce/stg_salesforce__user.sql +++ b/models/salesforce/stg_salesforce__user.sql @@ -1,3 +1,5 @@ +{% set user_column_list = get_user_columns() -%} +{% set user_dict = column_list_to_dict(user_column_list) -%} with fields as ( @@ -6,7 +8,7 @@ with fields as ( {{ fivetran_utils.fill_staging_columns( source_columns=adapter.get_columns_in_relation(source('salesforce','user')), - staging_columns=get_user_columns() + staging_columns=user_column_list ) }} @@ -18,34 +20,34 @@ final as ( select _fivetran_deleted, cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced, - account_id, - alias, - city, - company_name, - contact_id, - country, - country_code, - department, - email, - first_name, - id as user_id, - individual_id, - is_active, - cast(last_login_date as {{ dbt.type_timestamp() }}) as last_login_date, - last_name, - cast(last_referenced_date as {{ dbt.type_timestamp() }}) as last_referenced_date, - cast(last_viewed_date as {{ dbt.type_timestamp() }}) as last_viewed_date, - manager_id, - name as user_name, - postal_code, - profile_id, - state, - state_code, - street, - title, - user_role_id, - user_type, - username + {{ salesforce_source.coalesce_rename("account_id", user_dict ) }}, + {{ salesforce_source.coalesce_rename("alias", user_dict ) }}, + {{ salesforce_source.coalesce_rename("city", user_dict ) }}, + {{ salesforce_source.coalesce_rename("company_name", user_dict ) }}, + {{ salesforce_source.coalesce_rename("contact_id", user_dict ) }}, + {{ salesforce_source.coalesce_rename("country", user_dict ) }}, + {{ salesforce_source.coalesce_rename("country_code", user_dict ) }}, + {{ salesforce_source.coalesce_rename("department", user_dict ) }}, + {{ salesforce_source.coalesce_rename("email", user_dict ) }}, + {{ salesforce_source.coalesce_rename("first_name", user_dict ) }}, + {{ salesforce_source.coalesce_rename("id", user_dict, alias="user_id" ) }}, + {{ salesforce_source.coalesce_rename("individual_id", user_dict ) }}, + {{ salesforce_source.coalesce_rename("is_active", user_dict ) }}, + {{ salesforce_source.coalesce_rename("last_login_date", user_dict ) }}, + {{ salesforce_source.coalesce_rename("last_name", user_dict ) }}, + {{ salesforce_source.coalesce_rename("last_referenced_date", user_dict ) }}, + {{ salesforce_source.coalesce_rename("last_viewed_date", user_dict ) }}, + {{ salesforce_source.coalesce_rename("manager_id", user_dict ) }}, + {{ salesforce_source.coalesce_rename("name", user_dict, alias="user_name" ) }}, + {{ salesforce_source.coalesce_rename("postal_code", user_dict ) }}, + {{ salesforce_source.coalesce_rename("profile_id", user_dict ) }}, + {{ salesforce_source.coalesce_rename("state", user_dict ) }}, + {{ salesforce_source.coalesce_rename("state_code", user_dict ) }}, + {{ salesforce_source.coalesce_rename("street", user_dict ) }}, + {{ salesforce_source.coalesce_rename("title", user_dict ) }}, + {{ salesforce_source.coalesce_rename("user_role_id", user_dict ) }}, + {{ salesforce_source.coalesce_rename("user_type", user_dict ) }}, + {{ salesforce_source.coalesce_rename("username", user_dict ) }} {{ fivetran_utils.fill_pass_through_columns('salesforce__user_pass_through_columns') }} diff --git a/models/salesforce/stg_salesforce__user_role.sql b/models/salesforce/stg_salesforce__user_role.sql index ee4eaf6..8f2bb40 100644 --- a/models/salesforce/stg_salesforce__user_role.sql +++ b/models/salesforce/stg_salesforce__user_role.sql @@ -1,6 +1,9 @@ --To disable this model, set the salesforce__user_role_enabled within your dbt_project.yml file to False. {{ config(enabled=var('salesforce__user_role_enabled', True)) }} +{% set user_role_column_list = get_user_role_columns() -%} +{% set user_role_dict = column_list_to_dict(user_role_column_list) -%} + with fields as ( select @@ -8,7 +11,7 @@ with fields as ( {{ fivetran_utils.fill_staging_columns( source_columns=adapter.get_columns_in_relation(source('salesforce','user_role')), - staging_columns=get_user_role_columns() + staging_columns=user_role_column_list ) }} @@ -20,12 +23,12 @@ final as ( select _fivetran_deleted, cast(_fivetran_synced as {{ dbt.type_timestamp() }}) as _fivetran_synced, - developer_name, - id as user_role_id, - name as user_role_name, - opportunity_access_for_account_owner, - parent_role_id, - rollup_description + {{ salesforce_source.coalesce_rename("developer_name", user_role_dict ) }}, + {{ salesforce_source.coalesce_rename("id", user_role_dict, alias="user_role_id") }}, + {{ salesforce_source.coalesce_rename("name", user_role_dict, alias="user_role_name") }}, + {{ salesforce_source.coalesce_rename("opportunity_access_for_account_owner", user_role_dict ) }}, + {{ salesforce_source.coalesce_rename("parent_role_id", user_role_dict ) }}, + {{ salesforce_source.coalesce_rename("rollup_description", user_role_dict ) }} {{ fivetran_utils.fill_pass_through_columns('salesforce__user_role_pass_through_columns') }}