From 01af8539097056ebdbb5877e1e0e4b4c506d56d3 Mon Sep 17 00:00:00 2001 From: caldeirav Date: Fri, 6 Oct 2023 12:59:21 +0000 Subject: [PATCH] Execute data pipelines with new dependencies to get metadata in OM --- dbt/wri_gppd_transform/target/manifest.json | 2 +- .../target/run_results.json | 2 +- notebooks/wri-gppd-01-extraction.ipynb | 108 +++-- notebooks/wri-gppd-02-loading.ipynb | 409 +++++++++--------- 4 files changed, 288 insertions(+), 233 deletions(-) diff --git a/dbt/wri_gppd_transform/target/manifest.json b/dbt/wri_gppd_transform/target/manifest.json index c88847f..ff02557 100644 --- a/dbt/wri_gppd_transform/target/manifest.json +++ b/dbt/wri_gppd_transform/target/manifest.json @@ -1 +1 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v6.json", "dbt_version": "1.2.1", "generated_at": "2022-10-02T07:51:52.342433Z", "invocation_id": "a4a4caaf-d5d9-4458-9c47-9f082e1d81d1", "env": {}, "project_id": "85b3abc44205b53623a178810d690704", "user_id": "c8415488-1025-471c-9cb5-6cff279d771d", "send_anonymous_usage_stats": true, "adapter_type": "trino"}, "nodes": {"model.wri_gppd_transform.gppd_power_plants_list": {"raw_sql": "{{\n config(\n materialized = 'view',\n view_security = 'invoker'\n )\n}}\n\nwith source_data as (\n select gppd_idnr,name,country,country_long,latitude,longitude,capacity_mw, year_of_capacity_data, \n primary_fuel,other_fuel1,other_fuel2,other_fuel3,commissioning_year,owner \n from osc_datacommons_dev.wri_gppd.gppd_source\n)\n\nselect * from source_data", "compiled": true, "resource_type": "model", "depends_on": {"macros": [], "nodes": []}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "materialized": "view", "persist_docs": {}, "quoting": {}, "column_types": {}, "full_refresh": null, "unique_key": null, "on_schema_change": "ignore", "grants": {}, "view_security": "invoker", "post-hook": [], "pre-hook": []}, "database": "osc_datacommons_dev", "schema": "wri_gppd", "fqn": ["wri_gppd_transform", "gppd_power_plants_list"], "unique_id": "model.wri_gppd_transform.gppd_power_plants_list", "package_name": "wri_gppd_transform", "root_path": "/opt/app-root/src/wri-gppd-ingestion-pipeline/dbt/wri_gppd_transform", "path": "gppd_power_plants_list.sql", "original_file_path": "models/gppd_power_plants_list.sql", "name": "gppd_power_plants_list", "alias": "gppd_power_plants_list", "checksum": {"name": "sha256", "checksum": "39394249e263ac4b3b3bc74456f28ccdd775a0fa653c3b73437cd0c581ce69c1"}, "tags": [], "refs": [], "sources": [], "metrics": [], "description": "Open-source open-access dataset of grid-scale (1 MW and greater) electricity generating facilities operating across the world", "columns": {"gppd_idnr": {"name": "gppd_idnr", "description": "10 or 12 character identifier for the power plant", "meta": {}, "data_type": null, "quote": null, "tags": []}, "name": {"name": "name", "description": "name or title of the power plant, generally in Romanized form", "meta": {}, "data_type": null, "quote": null, "tags": []}, "country": {"name": "country", "description": "3 character country code corresponding to the ISO 3166-1 alpha-3 specification", "meta": {}, "data_type": null, "quote": null, "tags": []}, "country_long": {"name": "country_long", "description": "longer form of the country designation", "meta": {}, "data_type": null, "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "geolocation in decimal degrees", "meta": {}, "data_type": null, "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "geolocation in decimal degrees", "meta": {}, "data_type": null, "quote": null, "tags": []}, "capacity_mw": {"name": "capacity_mw", "description": "electrical generating capacity in megawatts", "meta": {}, "data_type": null, "quote": null, "tags": []}, "year_of_capacity_data": {"name": "year_of_capacity_data", "description": "year the capacity information was reported", "meta": {}, "data_type": null, "quote": null, "tags": []}}, "meta": {}, "docs": {"show": true}, "patch_path": "wri_gppd_transform://models/gppd_power_plants_list_schema.yml", "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list.sql", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "view_security": "invoker"}, "created_at": 1664696995.92042, "compiled_sql": "\n\nwith source_data as (\n select gppd_idnr,name,country,country_long,latitude,longitude,capacity_mw, year_of_capacity_data, \n primary_fuel,other_fuel1,other_fuel2,other_fuel3,commissioning_year,owner \n from osc_datacommons_dev.wri_gppd.gppd_source\n)\n\nselect * from source_data", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": "\"osc_datacommons_dev\".\"wri_gppd\".\"gppd_power_plants_list\""}, "test.wri_gppd_transform.unique_gppd_power_plants_list_gppd_idnr.85ac978899": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "gppd_idnr", "model": "{{ get_where_subquery(ref('gppd_power_plants_list')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "osc_datacommons_dev", "schema": "wri_gppd_dbt_test__audit", "fqn": ["wri_gppd_transform", "unique_gppd_power_plants_list_gppd_idnr"], "unique_id": "test.wri_gppd_transform.unique_gppd_power_plants_list_gppd_idnr.85ac978899", "package_name": "wri_gppd_transform", "root_path": "/opt/app-root/src/wri-gppd-ingestion-pipeline/dbt/wri_gppd_transform", "path": "unique_gppd_power_plants_list_gppd_idnr.sql", "original_file_path": "models/gppd_power_plants_list_schema.yml", "name": "unique_gppd_power_plants_list_gppd_idnr", "alias": "unique_gppd_power_plants_list_gppd_idnr", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gppd_power_plants_list"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/unique_gppd_power_plants_list_gppd_idnr.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1664696995.9272587, "compiled_sql": "\n \n \n\nselect\n gppd_idnr as unique_field,\n count(*) as n_records\n\nfrom \"osc_datacommons_dev\".\"wri_gppd\".\"gppd_power_plants_list\"\nwhere gppd_idnr is not null\ngroup by gppd_idnr\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "gppd_idnr", "file_key_name": "models.gppd_power_plants_list"}, "test.wri_gppd_transform.not_null_gppd_power_plants_list_gppd_idnr.bb278f73bc": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "gppd_idnr", "model": "{{ get_where_subquery(ref('gppd_power_plants_list')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "osc_datacommons_dev", "schema": "wri_gppd_dbt_test__audit", "fqn": ["wri_gppd_transform", "not_null_gppd_power_plants_list_gppd_idnr"], "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_gppd_idnr.bb278f73bc", "package_name": "wri_gppd_transform", "root_path": "/opt/app-root/src/wri-gppd-ingestion-pipeline/dbt/wri_gppd_transform", "path": "not_null_gppd_power_plants_list_gppd_idnr.sql", "original_file_path": "models/gppd_power_plants_list_schema.yml", "name": "not_null_gppd_power_plants_list_gppd_idnr", "alias": "not_null_gppd_power_plants_list_gppd_idnr", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gppd_power_plants_list"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_gppd_idnr.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1664696995.9302695, "compiled_sql": "\n \n \n\n\n\nselect gppd_idnr\nfrom \"osc_datacommons_dev\".\"wri_gppd\".\"gppd_power_plants_list\"\nwhere gppd_idnr is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "gppd_idnr", "file_key_name": "models.gppd_power_plants_list"}, "test.wri_gppd_transform.unique_gppd_power_plants_list_name.37c2d0f477": {"raw_sql": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "unique", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(ref('gppd_power_plants_list')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery"], "nodes": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "osc_datacommons_dev", "schema": "wri_gppd_dbt_test__audit", "fqn": ["wri_gppd_transform", "unique_gppd_power_plants_list_name"], "unique_id": "test.wri_gppd_transform.unique_gppd_power_plants_list_name.37c2d0f477", "package_name": "wri_gppd_transform", "root_path": "/opt/app-root/src/wri-gppd-ingestion-pipeline/dbt/wri_gppd_transform", "path": "unique_gppd_power_plants_list_name.sql", "original_file_path": "models/gppd_power_plants_list_schema.yml", "name": "unique_gppd_power_plants_list_name", "alias": "unique_gppd_power_plants_list_name", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gppd_power_plants_list"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/unique_gppd_power_plants_list_name.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1664696995.933023, "compiled_sql": "\n \n \n\nselect\n name as unique_field,\n count(*) as n_records\n\nfrom \"osc_datacommons_dev\".\"wri_gppd\".\"gppd_power_plants_list\"\nwhere name is not null\ngroup by name\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "name", "file_key_name": "models.gppd_power_plants_list"}, "test.wri_gppd_transform.not_null_gppd_power_plants_list_name.a415d9e2a5": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(ref('gppd_power_plants_list')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "osc_datacommons_dev", "schema": "wri_gppd_dbt_test__audit", "fqn": ["wri_gppd_transform", "not_null_gppd_power_plants_list_name"], "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_name.a415d9e2a5", "package_name": "wri_gppd_transform", "root_path": "/opt/app-root/src/wri-gppd-ingestion-pipeline/dbt/wri_gppd_transform", "path": "not_null_gppd_power_plants_list_name.sql", "original_file_path": "models/gppd_power_plants_list_schema.yml", "name": "not_null_gppd_power_plants_list_name", "alias": "not_null_gppd_power_plants_list_name", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gppd_power_plants_list"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_name.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1664696995.935749, "compiled_sql": "\n \n \n\n\n\nselect name\nfrom \"osc_datacommons_dev\".\"wri_gppd\".\"gppd_power_plants_list\"\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "name", "file_key_name": "models.gppd_power_plants_list"}, "test.wri_gppd_transform.not_null_gppd_power_plants_list_country.0d2e3aed2c": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "country", "model": "{{ get_where_subquery(ref('gppd_power_plants_list')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "osc_datacommons_dev", "schema": "wri_gppd_dbt_test__audit", "fqn": ["wri_gppd_transform", "not_null_gppd_power_plants_list_country"], "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_country.0d2e3aed2c", "package_name": "wri_gppd_transform", "root_path": "/opt/app-root/src/wri-gppd-ingestion-pipeline/dbt/wri_gppd_transform", "path": "not_null_gppd_power_plants_list_country.sql", "original_file_path": "models/gppd_power_plants_list_schema.yml", "name": "not_null_gppd_power_plants_list_country", "alias": "not_null_gppd_power_plants_list_country", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gppd_power_plants_list"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_country.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1664696995.938859, "compiled_sql": "\n \n \n\n\n\nselect country\nfrom \"osc_datacommons_dev\".\"wri_gppd\".\"gppd_power_plants_list\"\nwhere country is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "country", "file_key_name": "models.gppd_power_plants_list"}, "test.wri_gppd_transform.not_null_gppd_power_plants_list_country_long.d394df506e": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "country_long", "model": "{{ get_where_subquery(ref('gppd_power_plants_list')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "osc_datacommons_dev", "schema": "wri_gppd_dbt_test__audit", "fqn": ["wri_gppd_transform", "not_null_gppd_power_plants_list_country_long"], "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_country_long.d394df506e", "package_name": "wri_gppd_transform", "root_path": "/opt/app-root/src/wri-gppd-ingestion-pipeline/dbt/wri_gppd_transform", "path": "not_null_gppd_power_plants_list_country_long.sql", "original_file_path": "models/gppd_power_plants_list_schema.yml", "name": "not_null_gppd_power_plants_list_country_long", "alias": "not_null_gppd_power_plants_list_country_long", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gppd_power_plants_list"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_country_long.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1664696995.942397, "compiled_sql": "\n \n \n\n\n\nselect country_long\nfrom \"osc_datacommons_dev\".\"wri_gppd\".\"gppd_power_plants_list\"\nwhere country_long is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "country_long", "file_key_name": "models.gppd_power_plants_list"}, "test.wri_gppd_transform.not_null_gppd_power_plants_list_latitude.5cadb5eb49": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "latitude", "model": "{{ get_where_subquery(ref('gppd_power_plants_list')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "osc_datacommons_dev", "schema": "wri_gppd_dbt_test__audit", "fqn": ["wri_gppd_transform", "not_null_gppd_power_plants_list_latitude"], "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_latitude.5cadb5eb49", "package_name": "wri_gppd_transform", "root_path": "/opt/app-root/src/wri-gppd-ingestion-pipeline/dbt/wri_gppd_transform", "path": "not_null_gppd_power_plants_list_latitude.sql", "original_file_path": "models/gppd_power_plants_list_schema.yml", "name": "not_null_gppd_power_plants_list_latitude", "alias": "not_null_gppd_power_plants_list_latitude", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gppd_power_plants_list"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_latitude.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1664696995.9452069, "compiled_sql": "\n \n \n\n\n\nselect latitude\nfrom \"osc_datacommons_dev\".\"wri_gppd\".\"gppd_power_plants_list\"\nwhere latitude is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "latitude", "file_key_name": "models.gppd_power_plants_list"}, "test.wri_gppd_transform.not_null_gppd_power_plants_list_longitude.b9a294aa23": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "longitude", "model": "{{ get_where_subquery(ref('gppd_power_plants_list')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "osc_datacommons_dev", "schema": "wri_gppd_dbt_test__audit", "fqn": ["wri_gppd_transform", "not_null_gppd_power_plants_list_longitude"], "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_longitude.b9a294aa23", "package_name": "wri_gppd_transform", "root_path": "/opt/app-root/src/wri-gppd-ingestion-pipeline/dbt/wri_gppd_transform", "path": "not_null_gppd_power_plants_list_longitude.sql", "original_file_path": "models/gppd_power_plants_list_schema.yml", "name": "not_null_gppd_power_plants_list_longitude", "alias": "not_null_gppd_power_plants_list_longitude", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gppd_power_plants_list"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_longitude.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1664696995.948046, "compiled_sql": "\n \n \n\n\n\nselect longitude\nfrom \"osc_datacommons_dev\".\"wri_gppd\".\"gppd_power_plants_list\"\nwhere longitude is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "longitude", "file_key_name": "models.gppd_power_plants_list"}, "test.wri_gppd_transform.not_null_gppd_power_plants_list_capacity_mw.9f7ae55ef0": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "capacity_mw", "model": "{{ get_where_subquery(ref('gppd_power_plants_list')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "osc_datacommons_dev", "schema": "wri_gppd_dbt_test__audit", "fqn": ["wri_gppd_transform", "not_null_gppd_power_plants_list_capacity_mw"], "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_capacity_mw.9f7ae55ef0", "package_name": "wri_gppd_transform", "root_path": "/opt/app-root/src/wri-gppd-ingestion-pipeline/dbt/wri_gppd_transform", "path": "not_null_gppd_power_plants_list_capacity_mw.sql", "original_file_path": "models/gppd_power_plants_list_schema.yml", "name": "not_null_gppd_power_plants_list_capacity_mw", "alias": "not_null_gppd_power_plants_list_capacity_mw", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gppd_power_plants_list"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_capacity_mw.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1664696995.951042, "compiled_sql": "\n \n \n\n\n\nselect capacity_mw\nfrom \"osc_datacommons_dev\".\"wri_gppd\".\"gppd_power_plants_list\"\nwhere capacity_mw is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "capacity_mw", "file_key_name": "models.gppd_power_plants_list"}, "test.wri_gppd_transform.not_null_gppd_power_plants_list_year_of_capacity_data.1a3165a676": {"raw_sql": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "test_metadata": {"name": "not_null", "kwargs": {"column_name": "year_of_capacity_data", "model": "{{ get_where_subquery(ref('gppd_power_plants_list')) }}"}, "namespace": null}, "compiled": true, "resource_type": "test", "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery"], "nodes": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "config": {"enabled": true, "alias": null, "schema": "dbt_test__audit", "database": null, "tags": [], "meta": {}, "materialized": "test", "severity": "ERROR", "store_failures": null, "where": null, "limit": null, "fail_calc": "count(*)", "warn_if": "!= 0", "error_if": "!= 0"}, "database": "osc_datacommons_dev", "schema": "wri_gppd_dbt_test__audit", "fqn": ["wri_gppd_transform", "not_null_gppd_power_plants_list_year_of_capacity_data"], "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_year_of_capacity_data.1a3165a676", "package_name": "wri_gppd_transform", "root_path": "/opt/app-root/src/wri-gppd-ingestion-pipeline/dbt/wri_gppd_transform", "path": "not_null_gppd_power_plants_list_year_of_capacity_data.sql", "original_file_path": "models/gppd_power_plants_list_schema.yml", "name": "not_null_gppd_power_plants_list_year_of_capacity_data", "alias": "not_null_gppd_power_plants_list_year_of_capacity_data", "checksum": {"name": "none", "checksum": ""}, "tags": [], "refs": [["gppd_power_plants_list"]], "sources": [], "metrics": [], "description": "", "columns": {}, "meta": {}, "docs": {"show": true}, "patch_path": null, "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_year_of_capacity_data.sql", "build_path": null, "deferred": false, "unrendered_config": {}, "created_at": 1664696995.976812, "compiled_sql": "\n \n \n\n\n\nselect year_of_capacity_data\nfrom \"osc_datacommons_dev\".\"wri_gppd\".\"gppd_power_plants_list\"\nwhere year_of_capacity_data is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "relation_name": null, "column_name": "year_of_capacity_data", "file_key_name": "models.gppd_power_plants_list"}}, "sources": {}, "macros": {"macro.dbt_trino.trino__get_columns_in_relation": {"unique_id": "macro.dbt_trino.trino__get_columns_in_relation", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "trino__get_columns_in_relation", "macro_sql": "{% macro trino__get_columns_in_relation(relation) -%}\n {% call statement('get_columns_in_relation', fetch_result=True) %}\n select\n column_name,\n case when regexp_like(data_type, 'varchar\\(\\d+\\)') then 'varchar'\n else data_type\n end as data_type,\n case when regexp_like(data_type, 'varchar\\(\\d+\\)') then\n from_base(regexp_extract(data_type, 'varchar\\((\\d+)\\)', 1), 10)\n else NULL\n end as character_maximum_length,\n NULL as numeric_precision,\n NULL as numeric_scale\n\n from\n {{ relation.information_schema('columns') }}\n\n where\n table_name = '{{ relation.name }}'\n {% if relation.schema %}\n and table_schema = '{{ relation.schema | lower }}'\n {% endif %}\n order by ordinal_position\n\n {% endcall %}\n\n {% set table = load_result('get_columns_in_relation').table %}\n {{ return(sql_convert_columns_in_relation(table)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.sql_convert_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.177322}, "macro.dbt_trino.trino__list_relations_without_caching": {"unique_id": "macro.dbt_trino.trino__list_relations_without_caching", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "trino__list_relations_without_caching", "macro_sql": "{% macro trino__list_relations_without_caching(relation) %}\n {% call statement('list_relations_without_caching', fetch_result=True) -%}\n select\n table_catalog as database,\n table_name as name,\n table_schema as schema,\n case when table_type = 'BASE TABLE' then 'table'\n when table_type = 'VIEW' then 'view'\n else table_type\n end as table_type\n from {{ relation.information_schema() }}.tables\n where table_schema = '{{ relation.schema | lower }}'\n {% endcall %}\n {{ return(load_result('list_relations_without_caching').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.1780126}, "macro.dbt_trino.trino__reset_csv_table": {"unique_id": "macro.dbt_trino.trino__reset_csv_table", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "trino__reset_csv_table", "macro_sql": "{% macro trino__reset_csv_table(model, full_refresh, old_relation, agate_table) %}\n {{ adapter.drop_relation(old_relation) }}\n {{ return(create_csv_table(model, agate_table)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.1785038}, "macro.dbt_trino.trino__create_csv_table": {"unique_id": "macro.dbt_trino.trino__create_csv_table", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "trino__create_csv_table", "macro_sql": "{% macro trino__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 {%- set _properties = config.get('properties') -%}\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 ) {{ properties(_properties) }}\n {% endset %}\n\n {% call statement('_') -%}\n {{ sql }}\n {%- endcall %}\n\n {{ return(sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.properties", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.1804967}, "macro.dbt_trino.properties": {"unique_id": "macro.dbt_trino.properties", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "properties", "macro_sql": "{% macro properties(properties) %}\n {%- if properties is not none -%}\n WITH (\n {%- for key, value in properties.items() -%}\n {{ key }} = {{ value }}\n {%- if not loop.last -%}{{ ',\\n ' }}{%- endif -%}\n {%- endfor -%}\n )\n {%- endif -%}\n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.1812956}, "macro.dbt_trino.trino__create_table_as": {"unique_id": "macro.dbt_trino.trino__create_table_as", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "trino__create_table_as", "macro_sql": "{% macro trino__create_table_as(temporary, relation, sql) -%}\n {%- set _properties = config.get('properties') -%}\n create table {{ relation }}\n {{ properties(_properties) }}\n as (\n {{ sql }}\n );\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.properties"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.1818068}, "macro.dbt_trino.trino__create_view_as": {"unique_id": "macro.dbt_trino.trino__create_view_as", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "trino__create_view_as", "macro_sql": "{% macro trino__create_view_as(relation, sql) -%}\n {%- set view_security = config.get('view_security', 'definer') -%}\n {%- if view_security not in ['definer', 'invoker'] -%}\n {%- set log_message = 'Invalid value for view_security (%s) specified. Setting default value (%s).' % (view_security, 'definer') -%}\n {% do log(log_message) %}\n {%- set on_table_exists = 'definer' -%}\n {% endif %}\n create or replace view\n {{ relation }}\n security {{ view_security }}\n as\n {{ sql }}\n ;\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.1827753}, "macro.dbt_trino.trino__drop_relation": {"unique_id": "macro.dbt_trino.trino__drop_relation", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "trino__drop_relation", "macro_sql": "{% macro trino__drop_relation(relation) -%}\n {% call statement('drop_relation', auto_begin=False) -%}\n drop {{ relation.type }} if exists {{ relation }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.1832078}, "macro.dbt_trino.trino__information_schema_name": {"unique_id": "macro.dbt_trino.trino__information_schema_name", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "trino__information_schema_name", "macro_sql": "{% macro trino__information_schema_name(database) -%}\n {%- if database -%}\n {{ database }}.INFORMATION_SCHEMA\n {%- else -%}\n INFORMATION_SCHEMA\n {%- endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.1835494}, "macro.dbt_trino.trino__drop_schema": {"unique_id": "macro.dbt_trino.trino__drop_schema", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "trino__drop_schema", "macro_sql": "{% macro trino__drop_schema(relation) -%}\n {% for row in list_relations_without_caching(relation) %}\n {% set rel_db = row[0] %}\n {% set rel_identifier = row[1] %}\n {% set rel_schema = row[2] %}\n {% set rel_type = api.Relation.get_relation_type(row[3]) %}\n {% set existing = api.Relation.create(database=rel_db, schema=rel_schema, identifier=rel_identifier, type=rel_type) %}\n {% do drop_relation(existing) %}\n {% endfor %}\n {%- call statement('drop_schema') -%}\n drop schema if exists {{ relation }}\n {% endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.list_relations_without_caching", "macro.dbt.drop_relation", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.1849306}, "macro.dbt_trino.trino__rename_relation": {"unique_id": "macro.dbt_trino.trino__rename_relation", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "trino__rename_relation", "macro_sql": "{% macro trino__rename_relation(from_relation, to_relation) -%}\n {% call statement('rename_relation') -%}\n alter {{ from_relation.type }} {{ from_relation }} rename to {{ to_relation }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.185396}, "macro.dbt_trino.trino__alter_relation_comment": {"unique_id": "macro.dbt_trino.trino__alter_relation_comment", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "trino__alter_relation_comment", "macro_sql": "{% macro trino__alter_relation_comment(relation, relation_comment) -%}\n comment on {{ relation.type }} {{ relation }} is '{{ relation_comment | replace(\"'\", \"''\") }}';\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.1857927}, "macro.dbt_trino.trino__alter_column_comment": {"unique_id": "macro.dbt_trino.trino__alter_column_comment", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "trino__alter_column_comment", "macro_sql": "{% macro trino__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 {%- if comment|length -%}\n comment on column {{ relation }}.{{ adapter.quote(column_name) if column_dict[column_name]['quote'] else column_name }} is '{{ comment | replace(\"'\", \"''\") }}';\n {%- else -%}\n comment on column {{ relation }}.{{ adapter.quote(column_name) if column_dict[column_name]['quote'] else column_name }} is null;\n {%- endif -%}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.1872892}, "macro.dbt_trino.trino__list_schemas": {"unique_id": "macro.dbt_trino.trino__list_schemas", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "trino__list_schemas", "macro_sql": "{% macro trino__list_schemas(database) -%}\n {% call statement('list_schemas', fetch_result=True, auto_begin=False) %}\n select distinct schema_name\n from {{ information_schema_name(database) }}.schemata\n {% endcall %}\n {{ return(load_result('list_schemas').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.1878903}, "macro.dbt_trino.trino__check_schema_exists": {"unique_id": "macro.dbt_trino.trino__check_schema_exists", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "trino__check_schema_exists", "macro_sql": "{% macro trino__check_schema_exists(information_schema, schema) -%}\n {% call statement('check_schema_exists', fetch_result=True, auto_begin=False) -%}\n select count(*)\n from {{ information_schema }}.schemata\n where catalog_name = '{{ information_schema.database }}'\n and schema_name = '{{ schema | lower }}'\n {%- endcall %}\n {{ return(load_result('check_schema_exists').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.1885848}, "macro.dbt_trino.trino__get_binding_char": {"unique_id": "macro.dbt_trino.trino__get_binding_char", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "name": "trino__get_binding_char", "macro_sql": "{% macro trino__get_binding_char() %}\n {%- if target.prepared_statements_enabled|as_bool -%}\n {{ return('?') }}\n {%- else -%}\n {{ return('%s') }}\n {%- endif -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.1890159}, "macro.dbt_trino.trino__get_catalog": {"unique_id": "macro.dbt_trino.trino__get_catalog", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "name": "trino__get_catalog", "macro_sql": "{% macro trino__get_catalog(information_schema, schemas) -%}\n {%- call statement('catalog', fetch_result=True) -%}\n with tables as (\n\n select\n table_catalog as \"table_database\",\n table_schema as \"table_schema\",\n table_name as \"table_name\",\n table_type as \"table_type\",\n null as \"table_owner\"\n\n from {{ information_schema }}.tables\n where\n table_schema != 'information_schema'\n and\n table_schema in ('{{ schemas | join(\"','\") | lower }}')\n\n ),\n\n columns as (\n\n select\n table_catalog as \"table_database\",\n table_schema as \"table_schema\",\n table_name as \"table_name\",\n\n column_name as \"column_name\",\n ordinal_position as \"column_index\",\n data_type as \"column_type\",\n comment as \"column_comment\"\n\n from {{ information_schema }}.columns\n where\n table_schema != 'information_schema'\n and\n table_schema in ('{{ schemas | join(\"','\") | lower }}')\n\n ),\n\n table_comment as (\n\n select\n catalog_name as \"table_database\",\n schema_name as \"table_schema\",\n table_name as \"table_name\",\n comment as \"table_comment\"\n\n from system.metadata.table_comments\n where\n catalog_name = '{{ database }}'\n and\n schema_name != 'information_schema'\n and\n schema_name in ('{{ schemas | join(\"','\") | lower }}')\n )\n\n select *\n from tables\n join columns using (\"table_database\", \"table_schema\", \"table_name\")\n join table_comment using (\"table_database\", \"table_schema\", \"table_name\")\n order by \"column_index\"\n\n {%- endcall -%}\n\n {{ return(load_result('catalog').table) }}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.1913073}, "macro.dbt_trino.trino__any_value": {"unique_id": "macro.dbt_trino.trino__any_value", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/crossdb/any_value.sql", "original_file_path": "macros/crossdb/any_value.sql", "name": "trino__any_value", "macro_sql": "{% macro trino__any_value(expression) -%}\n min({{ expression }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.1918747}, "macro.dbt_trino.trino__bool_or": {"unique_id": "macro.dbt_trino.trino__bool_or", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/crossdb/bool_or.sql", "original_file_path": "macros/crossdb/bool_or.sql", "name": "trino__bool_or", "macro_sql": "{% macro trino__bool_or(expression) -%}\n bool_or({{ expression }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.192446}, "macro.dbt_trino.trino__current_timestamp": {"unique_id": "macro.dbt_trino.trino__current_timestamp", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/crossdb/current_timestamp.sql", "original_file_path": "macros/crossdb/current_timestamp.sql", "name": "trino__current_timestamp", "macro_sql": "{% macro trino__current_timestamp() -%}\n current_timestamp\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.19292}, "macro.dbt_trino.trino__type_float": {"unique_id": "macro.dbt_trino.trino__type_float", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/crossdb/datatypes.sql", "original_file_path": "macros/crossdb/datatypes.sql", "name": "trino__type_float", "macro_sql": "{% macro trino__type_float() -%}\n double\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.1934872}, "macro.dbt_trino.trino__type_string": {"unique_id": "macro.dbt_trino.trino__type_string", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/crossdb/datatypes.sql", "original_file_path": "macros/crossdb/datatypes.sql", "name": "trino__type_string", "macro_sql": "{% macro trino__type_string() -%}\n varchar\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.193635}, "macro.dbt_trino.trino__type_numeric": {"unique_id": "macro.dbt_trino.trino__type_numeric", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/crossdb/datatypes.sql", "original_file_path": "macros/crossdb/datatypes.sql", "name": "trino__type_numeric", "macro_sql": "{% macro trino__type_numeric() -%}\n DECIMAL(28, 6)\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.1937795}, "macro.dbt_trino.trino__type_int": {"unique_id": "macro.dbt_trino.trino__type_int", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/crossdb/datatypes.sql", "original_file_path": "macros/crossdb/datatypes.sql", "name": "trino__type_int", "macro_sql": "\n\n{%- macro trino__type_int() -%}\n integer\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.193923}, "macro.dbt_trino.trino__date_trunc": {"unique_id": "macro.dbt_trino.trino__date_trunc", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/crossdb/date_trunc.sql", "original_file_path": "macros/crossdb/date_trunc.sql", "name": "trino__date_trunc", "macro_sql": "{% macro trino__date_trunc(datepart, date) -%}\n date_trunc('{{datepart}}', {{date}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.19455}, "macro.dbt_trino.trino__dateadd": {"unique_id": "macro.dbt_trino.trino__dateadd", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/crossdb/dateadd.sql", "original_file_path": "macros/crossdb/dateadd.sql", "name": "trino__dateadd", "macro_sql": "{% macro trino__dateadd(datepart, interval, from_date_or_timestamp) -%}\n date_add('{{ datepart }}', {{ interval }}, {{ from_date_or_timestamp }})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.1952214}, "macro.dbt_trino.trino__datediff": {"unique_id": "macro.dbt_trino.trino__datediff", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/crossdb/datediff.sql", "original_file_path": "macros/crossdb/datediff.sql", "name": "trino__datediff", "macro_sql": "{% macro trino__datediff(first_date, second_date, datepart) -%}\n {%- if datepart == 'year' -%}\n (year(CAST({{ second_date }} AS TIMESTAMP)) - year(CAST({{ first_date }} AS TIMESTAMP)))\n {%- elif datepart == 'quarter' -%}\n ({{ datediff(first_date, second_date, 'year') }} * 4) + quarter(CAST({{ second_date }} AS TIMESTAMP)) - quarter(CAST({{ first_date }} AS TIMESTAMP))\n {%- elif datepart == 'month' -%}\n ({{ datediff(first_date, second_date, 'year') }} * 12) + month(CAST({{ second_date }} AS TIMESTAMP)) - month(CAST({{ first_date }} AS TIMESTAMP))\n {%- elif datepart == 'day' -%}\n ((to_milliseconds((CAST(CAST({{ second_date }} AS TIMESTAMP) AS DATE) - CAST(CAST({{ first_date }} AS TIMESTAMP) AS DATE)))) / 86400000)\n {%- elif datepart == 'week' -%}\n ({{ datediff(first_date, second_date, 'day') }} / 7 + case\n when dow(CAST({{first_date}} AS TIMESTAMP)) <= dow(CAST({{second_date}} AS 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 + hour(CAST({{ second_date }} AS TIMESTAMP)) - hour(CAST({{ first_date }} AS TIMESTAMP)))\n {%- elif datepart == 'minute' -%}\n ({{ datediff(first_date, second_date, 'hour') }} * 60 + minute(CAST({{ second_date }} AS TIMESTAMP)) - minute(CAST({{ first_date }} AS TIMESTAMP)))\n {%- elif datepart == 'second' -%}\n ({{ datediff(first_date, second_date, 'minute') }} * 60 + second(CAST({{ second_date }} AS TIMESTAMP)) - second(CAST({{ first_date }} AS TIMESTAMP)))\n {%- elif datepart == 'millisecond' -%}\n (to_milliseconds((CAST({{ second_date }} AS TIMESTAMP) - CAST({{ first_date }} AS TIMESTAMP))))\n {%- else -%}\n {% if execute %}{{ exceptions.raise_compiler_error(\"Unsupported datepart for macro datediff in Trino: {!r}\".format(datepart)) }}{% endif %}\n {%- endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2003682}, "macro.dbt_trino.trino__hash": {"unique_id": "macro.dbt_trino.trino__hash", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/crossdb/hash.sql", "original_file_path": "macros/crossdb/hash.sql", "name": "trino__hash", "macro_sql": "{% macro trino__hash(field) -%}\n lower(to_hex(md5(to_utf8(cast({{field}} as varchar)))))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2009435}, "macro.dbt_trino.trino__listagg": {"unique_id": "macro.dbt_trino.trino__listagg", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/crossdb/listagg.sql", "original_file_path": "macros/crossdb/listagg.sql", "name": "trino__listagg", "macro_sql": "{% macro trino__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n {% set collect_list %} array_agg({{ measure }} {% if order_by_clause -%}{{ order_by_clause }}{%- endif %}) {% endset %}\n {% set limited %} slice({{ collect_list }}, 1, {{ limit_num }}) {% endset %}\n {% set collected = limited if limit_num else collect_list %}\n {% set final %} array_join({{ collected }}, {{ delimiter_text }}) {% endset %}\n {% do return(final) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2026193}, "macro.dbt_trino.trino__right": {"unique_id": "macro.dbt_trino.trino__right", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/crossdb/right.sql", "original_file_path": "macros/crossdb/right.sql", "name": "trino__right", "macro_sql": "{% macro trino__right(string_text, length_expression) %}\n case when {{ length_expression }} = 0\n then ''\n else\n substr({{ string_text }}, -1 * ({{ length_expression }}))\n end\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2033348}, "macro.dbt_trino.trino__safe_cast": {"unique_id": "macro.dbt_trino.trino__safe_cast", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/crossdb/safe_cast.sql", "original_file_path": "macros/crossdb/safe_cast.sql", "name": "trino__safe_cast", "macro_sql": "{% macro trino__safe_cast(field, type) -%}\n try_cast({{field}} as {{type}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.203942}, "macro.dbt_trino.validate_get_incremental_strategy": {"unique_id": "macro.dbt_trino.validate_get_incremental_strategy", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "validate_get_incremental_strategy", "macro_sql": "{% macro validate_get_incremental_strategy(config) %}\n {#-- Find and validate the incremental strategy #}\n {%- set strategy = config.get(\"incremental_strategy\", default=\"append\") -%}\n\n {% set invalid_strategy_msg -%}\n Invalid incremental strategy provided: {{ strategy }}\n Expected one of: 'append', 'delete+insert', 'merge'\n {%- endset %}\n {% if strategy not in ['append', 'delete+insert', 'merge'] %}\n {% do exceptions.raise_compiler_error(invalid_strategy_msg) %}\n {% endif %}\n\n {% do return(strategy) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2150578}, "macro.dbt_trino.get_incremental_sql": {"unique_id": "macro.dbt_trino.get_incremental_sql", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "get_incremental_sql", "macro_sql": "{% macro get_incremental_sql(strategy, tmp_relation, target_relation, unique_key, dest_columns) %}\n {% if strategy == 'append' %}\n {% do return(get_append_sql(target_relation, tmp_relation, dest_columns)) %}\n {% elif strategy == 'delete+insert' %}\n {% do return(get_delete_insert_merge_sql(target_relation, tmp_relation, unique_key, dest_columns)) %}\n {% elif strategy == 'merge' %}\n {% do return(get_merge_sql(target_relation, tmp_relation, unique_key, dest_columns, predicates=none)) %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.get_append_sql", "macro.dbt.get_delete_insert_merge_sql", "macro.dbt.get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.216196}, "macro.dbt_trino.get_append_sql": {"unique_id": "macro.dbt_trino.get_append_sql", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "get_append_sql", "macro_sql": "{% macro get_append_sql(target_relation, tmp_relation, dest_columns) %}\n {%- set dest_cols_csv = dest_columns | map(attribute='quoted') | join(', ') -%}\n insert into {{ target_relation }}\n select {{dest_cols_csv}} from {{ tmp_relation }};\n\n drop table if exists {{ tmp_relation }};\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.216776}, "macro.dbt_trino.trino__get_delete_insert_merge_sql": {"unique_id": "macro.dbt_trino.trino__get_delete_insert_merge_sql", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "trino__get_delete_insert_merge_sql", "macro_sql": "{% macro trino__get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\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 where\n {% for key in unique_key %}\n {{ target }}.{{ key }} in (select {{ key }} from {{ source }})\n {{ \"and \" if not loop.last }}\n {% endfor %}\n ;\n {% else %}\n delete from {{ target }}\n where (\n {{ unique_key }}) in (\n select {{ unique_key }}\n from {{ source }}\n );\n\n {% endif %}\n {% endif %}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2181647}, "macro.dbt_trino.trino__get_merge_sql": {"unique_id": "macro.dbt_trino.trino__get_merge_sql", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "trino__get_merge_sql", "macro_sql": "{% macro trino__get_merge_sql(target, source, unique_key, dest_columns, predicates=none) -%}\n {%- set predicates = [] if predicates is none else [] + predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set dest_cols_csv_source = dest_cols_csv.split(', ') -%}\n {%- set update_columns = config.get('merge_update_columns', default = dest_columns | map(attribute=\"quoted\") | list) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {% if unique_key %}\n {% if unique_key is sequence and unique_key is not mapping and unique_key is not string %}\n {% for key in unique_key %}\n {% set this_key_match -%}\n DBT_INTERNAL_SOURCE.{{ key }} = DBT_INTERNAL_DEST.{{ key }}\n {%- endset %}\n {% do predicates.append(this_key_match) %}\n {% endfor %}\n {% else %}\n {% set unique_key_match -%}\n DBT_INTERNAL_SOURCE.{{ unique_key }} = DBT_INTERNAL_DEST.{{ unique_key }}\n {%- endset %}\n {% do predicates.append(unique_key_match) %}\n {% endif %}\n\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 on\n {{ predicates | join(' and\n ') }}\n\n {%- if unique_key %}\n\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 %},\n {% endif %}\n {%- endfor %}\n {%- endif %}\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({% for dest_cols in dest_cols_csv_source -%}\n DBT_INTERNAL_SOURCE.{{ dest_cols }}\n {%- if not loop.last %}, {% endif %}\n {%- endfor %})\n\n {% else %}\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2215154}, "macro.dbt_trino.materialization_incremental_trino": {"unique_id": "macro.dbt_trino.materialization_incremental_trino", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "name": "materialization_incremental_trino", "macro_sql": "{% materialization incremental, adapter='trino' -%}\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (flags.FULL_REFRESH == True) -%}\n\n {%- set target_relation = this.incorporate(type='table') -%}\n {%- set existing_relation = load_relation(this) -%}\n {%- set tmp_relation = make_temp_relation(this) -%}\n\n {#-- Validate early so we don't run SQL if the strategy is invalid --#}\n {%- set strategy = validate_get_incremental_strategy(config) -%}\n\n {{ run_hooks(pre_hooks) }}\n\n {% if existing_relation is none %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n {% elif existing_relation.is_view or full_refresh_mode %}\n {% do adapter.drop_relation(existing_relation) %}\n {% set build_sql = create_table_as(False, target_relation, sql) %}\n {% else %}\n {% set drop_tmp_relation_sql = \"drop table if exists \" ~ tmp_relation %}\n {% do run_query(drop_tmp_relation_sql) %}\n {% do run_query(create_table_as(True, tmp_relation, sql)) %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% set build_sql = get_incremental_sql(strategy, tmp_relation, target_relation, unique_key, dest_columns) %}\n {% endif %}\n\n {%- call statement('main') -%}\n {{ build_sql }}\n {%- endcall -%}\n\n {{ run_hooks(post_hooks) }}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.load_relation", "macro.dbt.make_temp_relation", "macro.dbt_trino.validate_get_incremental_strategy", "macro.dbt.run_hooks", "macro.dbt.create_table_as", "macro.dbt.run_query", "macro.dbt_trino.get_incremental_sql", "macro.dbt.statement", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.224355}, "macro.dbt_trino.trino__snapshot_hash_arguments": {"unique_id": "macro.dbt_trino.trino__snapshot_hash_arguments", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "name": "trino__snapshot_hash_arguments", "macro_sql": "{% macro trino__snapshot_hash_arguments(args) -%}\n lower(to_hex(md5(to_utf8(concat({%- for arg in args -%}\n coalesce(cast({{ arg }} as varchar), ''){% if not loop.last %}, '|',{% endif -%}\n {%- endfor -%}\n )))))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2258337}, "macro.dbt_trino.trino__post_snapshot": {"unique_id": "macro.dbt_trino.trino__post_snapshot", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "name": "trino__post_snapshot", "macro_sql": "{% macro trino__post_snapshot(staging_relation) %}\n -- Clean up the snapshot temp table\n {% do drop_relation(staging_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2261064}, "macro.dbt_trino.trino__snapshot_merge_sql": {"unique_id": "macro.dbt_trino.trino__snapshot_merge_sql", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "name": "trino__snapshot_merge_sql", "macro_sql": "{% macro trino__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 ({% for insert_col in insert_cols -%}\n DBT_INTERNAL_SOURCE.{{ insert_col }}\n {%- if not loop.last %}, {% endif %}\n {%- endfor %})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2268543}, "macro.dbt_trino.materialization_table_trino": {"unique_id": "macro.dbt_trino.materialization_table_trino", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/materializations/table.sql", "original_file_path": "macros/materializations/table.sql", "name": "materialization_table_trino", "macro_sql": "{% materialization table, adapter = 'trino' %}\n {%- set on_table_exists = config.get('on_table_exists', 'rename') -%}\n {% if on_table_exists not in ['rename', 'drop'] %}\n {%- set log_message = 'Invalid value for on_table_exists (%s) specified. Setting default value (%s).' % (on_table_exists, 'rename') -%}\n {% do log(log_message) %}\n {%- set on_table_exists = 'rename' -%}\n {% endif %}\n {%- set identifier = model['alias'] -%}\n {%- set tmp_identifier = model['name'] + '__dbt_tmp' -%}\n {%- set backup_identifier = model['name'] + '__dbt_backup' -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set target_relation = api.Relation.create(identifier=identifier,\n schema=schema,\n database=database,\n type='table') -%}\n\n {% if on_table_exists == 'rename' %}\n {%- set intermediate_relation = api.Relation.create(identifier=tmp_identifier,\n schema=schema,\n database=database,\n type='table') -%}\n\n {%- set backup_relation_type = 'table' if old_relation is none else old_relation.type -%}\n {%- set backup_relation = api.Relation.create(identifier=backup_identifier,\n schema=schema,\n database=database,\n type=backup_relation_type) -%}\n\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 -- drop the temp relations if they exists for some reason\n {{ adapter.drop_relation(intermediate_relation) }}\n {{ adapter.drop_relation(backup_relation) }}\n {% endif %}\n\n {{ run_hooks(pre_hooks) }}\n\n {% if on_table_exists == 'rename' %}\n {#-- build modeldock #}\n {% call statement('main') -%}\n {{ create_table_as(False, intermediate_relation, sql) }}\n {%- endcall %}\n\n {#-- cleanup #}\n {% if old_relation is not none %}\n {{ adapter.rename_relation(old_relation, backup_relation) }}\n {% endif %}\n\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {#-- finally, drop the existing/backup relation after the commit #}\n {{ drop_relation_if_exists(backup_relation) }}\n\n {% elif on_table_exists == 'drop' %}\n {#-- cleanup #}\n {%- if old_relation is not none -%}\n {{ adapter.drop_relation(old_relation) }}\n {%- endif -%}\n\n {#-- build model #}\n {% call statement('main') -%}\n {{ create_table_as(False, target_relation, sql) }}\n {%- endcall %}\n {% endif %}\n\n {{ run_hooks(post_hooks) }}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ return({'relations': [target_relation]}) }}\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt.drop_relation_if_exists", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2340322}, "macro.dbt_trino.materialization_view_trino": {"unique_id": "macro.dbt_trino.materialization_view_trino", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/materializations/view.sql", "original_file_path": "macros/materializations/view.sql", "name": "materialization_view_trino", "macro_sql": "{% materialization view, adapter='trino' -%}\n {% set to_return = create_or_replace_view() %}\n {% set target_relation = this.incorporate(type='view') %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% do return(to_return) %}\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_or_replace_view", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2350957}, "macro.dbt_trino.trino__get_batch_size": {"unique_id": "macro.dbt_trino.trino__get_batch_size", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "trino__get_batch_size", "macro_sql": "{% macro trino__get_batch_size() %}\n {{ return(1000) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2379339}, "macro.dbt_trino.create_bindings": {"unique_id": "macro.dbt_trino.create_bindings", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "create_bindings", "macro_sql": "{% macro create_bindings(row, types) %}\n {% set values = [] %}\n {% set re = modules.re %}\n\n {%- for item in row -%}\n {%- set type = types[loop.index0] -%}\n {%- set match_type = re.match(\"(\\w+)(\\(.*\\))?\", type) -%}\n {%- if item is not none and item is string and 'interval' in match_type.group(1) -%}\n {%- do values.append((none, match_type.group(1).upper() ~ \" \" ~ item)) -%}\n {%- elif item is not none and item is string and 'varchar' not in type.lower() -%}\n {%- do values.append((none, match_type.group(1).upper() ~ \" '\" ~ item ~ \"'\")) -%}\n {%- elif item is not none and 'varchar' in type.lower() -%}\n {%- do values.append((get_binding_char(), item|string())) -%}\n {%- else -%}\n {%- do values.append((get_binding_char(), item)) -%}\n {% endif -%}\n {%- endfor -%}\n {{ return(values) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.27677}, "macro.dbt_trino.trino__load_csv_rows": {"unique_id": "macro.dbt_trino.trino__load_csv_rows", "package_name": "dbt_trino", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/trino", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "trino__load_csv_rows", "macro_sql": "{% macro trino__load_csv_rows(model, agate_table) %}\n {% set column_override = model['config'].get('column_types', {}) %}\n {% set types = [] %}\n\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 {%- do types.append(type) -%}\n {%- endfor -%}\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 {% set sql %}\n insert into {{ this.render() }} ({{ cols_sql }}) values\n {% for row in chunk -%}\n ({%- for tuple in create_bindings(row, types) -%}\n {%- if tuple.0 is not none -%}\n {{ tuple.0 }}\n {%- do bindings.append(tuple.1) -%}\n {%- else -%}\n {{ tuple.1 }}\n {%- endif -%}\n {%- if not loop.last%},{%- endif %}\n {%- endfor -%})\n {%- if not loop.last%},{%- endif %}\n {%- endfor %}\n {% endset %}\n\n {% do adapter.add_query(sql, bindings=bindings, abridge_sql_log=True) %}\n\n {% if loop.index0 == 0 %}\n {% do statements.append(sql) %}\n {% endif %}\n {% endfor %}\n\n {# Return SQL so we can render it out into the compiled files #}\n {{ return(statements[0]) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_batch_size", "macro.dbt.get_seed_column_quoted_csv", "macro.dbt_trino.create_bindings"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2801015}, "macro.dbt.copy_grants": {"unique_id": "macro.dbt.copy_grants", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "copy_grants", "macro_sql": "{% macro copy_grants() %}\n {{ return(adapter.dispatch('copy_grants', 'dbt')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2830625}, "macro.dbt.default__copy_grants": {"unique_id": "macro.dbt.default__copy_grants", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "default__copy_grants", "macro_sql": "{% macro default__copy_grants() %}\n {{ return(True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2833114}, "macro.dbt.support_multiple_grantees_per_dcl_statement": {"unique_id": "macro.dbt.support_multiple_grantees_per_dcl_statement", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "support_multiple_grantees_per_dcl_statement", "macro_sql": "{% macro support_multiple_grantees_per_dcl_statement() %}\n {{ return(adapter.dispatch('support_multiple_grantees_per_dcl_statement', 'dbt')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2836328}, "macro.dbt.default__support_multiple_grantees_per_dcl_statement": {"unique_id": "macro.dbt.default__support_multiple_grantees_per_dcl_statement", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "default__support_multiple_grantees_per_dcl_statement", "macro_sql": "\n\n{%- macro default__support_multiple_grantees_per_dcl_statement() -%}\n {{ return(True) }}\n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.283851}, "macro.dbt.should_revoke": {"unique_id": "macro.dbt.should_revoke", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "should_revoke", "macro_sql": "{% macro should_revoke(existing_relation, full_refresh_mode=True) %}\n\n {% if not existing_relation %}\n {#-- The table doesn't already exist, so no grants to copy over --#}\n {{ return(False) }}\n {% elif full_refresh_mode %}\n {#-- The object is being REPLACED -- whether grants are copied over depends on the value of user config --#}\n {{ return(copy_grants()) }}\n {% else %}\n {#-- The table is being merged/upserted/inserted -- grants will be carried over --#}\n {{ return(True) }}\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.284524}, "macro.dbt.get_show_grant_sql": {"unique_id": "macro.dbt.get_show_grant_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "get_show_grant_sql", "macro_sql": "{% macro get_show_grant_sql(relation) %}\n {{ return(adapter.dispatch(\"get_show_grant_sql\", \"dbt\")(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_show_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2848916}, "macro.dbt.default__get_show_grant_sql": {"unique_id": "macro.dbt.default__get_show_grant_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "default__get_show_grant_sql", "macro_sql": "{% macro default__get_show_grant_sql(relation) %}\n show grants on {{ relation }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2850974}, "macro.dbt.get_grant_sql": {"unique_id": "macro.dbt.get_grant_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "get_grant_sql", "macro_sql": "{% macro get_grant_sql(relation, privilege, grantees) %}\n {{ return(adapter.dispatch('get_grant_sql', 'dbt')(relation, privilege, grantees)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2855434}, "macro.dbt.default__get_grant_sql": {"unique_id": "macro.dbt.default__get_grant_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "default__get_grant_sql", "macro_sql": "\n\n{%- macro default__get_grant_sql(relation, privilege, grantees) -%}\n grant {{ privilege }} on {{ relation }} to {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2859166}, "macro.dbt.get_revoke_sql": {"unique_id": "macro.dbt.get_revoke_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "get_revoke_sql", "macro_sql": "{% macro get_revoke_sql(relation, privilege, grantees) %}\n {{ return(adapter.dispatch('get_revoke_sql', 'dbt')(relation, privilege, grantees)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_revoke_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2863727}, "macro.dbt.default__get_revoke_sql": {"unique_id": "macro.dbt.default__get_revoke_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "default__get_revoke_sql", "macro_sql": "\n\n{%- macro default__get_revoke_sql(relation, privilege, grantees) -%}\n revoke {{ privilege }} on {{ relation }} from {{ grantees | join(', ') }}\n{%- endmacro -%}\n\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.286742}, "macro.dbt.get_dcl_statement_list": {"unique_id": "macro.dbt.get_dcl_statement_list", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "get_dcl_statement_list", "macro_sql": "{% macro get_dcl_statement_list(relation, grant_config, get_dcl_macro) %}\n {{ return(adapter.dispatch('get_dcl_statement_list', 'dbt')(relation, grant_config, get_dcl_macro)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_dcl_statement_list"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2871807}, "macro.dbt.default__get_dcl_statement_list": {"unique_id": "macro.dbt.default__get_dcl_statement_list", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "default__get_dcl_statement_list", "macro_sql": "\n\n{%- macro default__get_dcl_statement_list(relation, grant_config, get_dcl_macro) -%}\n {#\n -- Unpack grant_config into specific privileges and the set of users who need them granted/revoked.\n -- Depending on whether this database supports multiple grantees per statement, pass in the list of\n -- all grantees per privilege, or (if not) template one statement per privilege-grantee pair.\n -- `get_dcl_macro` will be either `get_grant_sql` or `get_revoke_sql`\n #}\n {%- set dcl_statements = [] -%}\n {%- for privilege, grantees in grant_config.items() %}\n {%- if support_multiple_grantees_per_dcl_statement() and grantees -%}\n {%- set dcl = get_dcl_macro(relation, privilege, grantees) -%}\n {%- do dcl_statements.append(dcl) -%}\n {%- else -%}\n {%- for grantee in grantees -%}\n {% set dcl = get_dcl_macro(relation, privilege, [grantee]) %}\n {%- do dcl_statements.append(dcl) -%}\n {% endfor -%}\n {%- endif -%}\n {%- endfor -%}\n {{ return(dcl_statements) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.288479}, "macro.dbt.call_dcl_statements": {"unique_id": "macro.dbt.call_dcl_statements", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "call_dcl_statements", "macro_sql": "{% macro call_dcl_statements(dcl_statement_list) %}\n {{ return(adapter.dispatch(\"call_dcl_statements\", \"dbt\")(dcl_statement_list)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__call_dcl_statements"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2888546}, "macro.dbt.default__call_dcl_statements": {"unique_id": "macro.dbt.default__call_dcl_statements", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "default__call_dcl_statements", "macro_sql": "{% macro default__call_dcl_statements(dcl_statement_list) %}\n {#\n -- By default, supply all grant + revoke statements in a single semicolon-separated block,\n -- so that they're all processed together.\n\n -- Some databases do not support this. Those adapters will need to override this macro\n -- to run each statement individually.\n #}\n {% call statement('grants') %}\n {% for dcl_statement in dcl_statement_list %}\n {{ dcl_statement }};\n {% endfor %}\n {% endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2893474}, "macro.dbt.apply_grants": {"unique_id": "macro.dbt.apply_grants", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "apply_grants", "macro_sql": "{% macro apply_grants(relation, grant_config, should_revoke) %}\n {{ return(adapter.dispatch(\"apply_grants\", \"dbt\")(relation, grant_config, should_revoke)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2897928}, "macro.dbt.default__apply_grants": {"unique_id": "macro.dbt.default__apply_grants", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/apply_grants.sql", "original_file_path": "macros/adapters/apply_grants.sql", "name": "default__apply_grants", "macro_sql": "{% macro default__apply_grants(relation, grant_config, should_revoke=True) %}\n {#-- If grant_config is {} or None, this is a no-op --#}\n {% if grant_config %}\n {% if should_revoke %}\n {#-- We think previous grants may have carried over --#}\n {#-- Show current grants and calculate diffs --#}\n {% set current_grants_table = run_query(get_show_grant_sql(relation)) %}\n {% set current_grants_dict = adapter.standardize_grants_dict(current_grants_table) %}\n {% set needs_granting = diff_of_two_dicts(grant_config, current_grants_dict) %}\n {% set needs_revoking = diff_of_two_dicts(current_grants_dict, grant_config) %}\n {% if not (needs_granting or needs_revoking) %}\n {{ log('On ' ~ relation ~': All grants are in place, no revocation or granting needed.')}}\n {% endif %}\n {% else %}\n {#-- We don't think there's any chance of previous grants having carried over. --#}\n {#-- Jump straight to granting what the user has configured. --#}\n {% set needs_revoking = {} %}\n {% set needs_granting = grant_config %}\n {% endif %}\n {% if needs_granting or needs_revoking %}\n {% set revoke_statement_list = get_dcl_statement_list(relation, needs_revoking, get_revoke_sql) %}\n {% set grant_statement_list = get_dcl_statement_list(relation, needs_granting, get_grant_sql) %}\n {% set dcl_statement_list = revoke_statement_list + grant_statement_list %}\n {% if dcl_statement_list %}\n {{ call_dcl_statements(dcl_statement_list) }}\n {% endif %}\n {% endif %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.get_show_grant_sql", "macro.dbt.get_dcl_statement_list", "macro.dbt.call_dcl_statements"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2921882}, "macro.dbt.get_columns_in_relation": {"unique_id": "macro.dbt.get_columns_in_relation", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "get_columns_in_relation", "macro_sql": "{% macro get_columns_in_relation(relation) -%}\n {{ return(adapter.dispatch('get_columns_in_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2951186}, "macro.dbt.default__get_columns_in_relation": {"unique_id": "macro.dbt.default__get_columns_in_relation", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "default__get_columns_in_relation", "macro_sql": "{% macro default__get_columns_in_relation(relation) -%}\n {{ exceptions.raise_not_implemented(\n 'get_columns_in_relation macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.295445}, "macro.dbt.sql_convert_columns_in_relation": {"unique_id": "macro.dbt.sql_convert_columns_in_relation", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "sql_convert_columns_in_relation", "macro_sql": "{% macro sql_convert_columns_in_relation(table) -%}\n {% set columns = [] %}\n {% for row in table %}\n {% do columns.append(api.Column(*row)) %}\n {% endfor %}\n {{ return(columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2960424}, "macro.dbt.get_columns_in_query": {"unique_id": "macro.dbt.get_columns_in_query", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "get_columns_in_query", "macro_sql": "{% macro get_columns_in_query(select_sql) -%}\n {{ return(adapter.dispatch('get_columns_in_query', 'dbt')(select_sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2964242}, "macro.dbt.default__get_columns_in_query": {"unique_id": "macro.dbt.default__get_columns_in_query", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "default__get_columns_in_query", "macro_sql": "{% macro default__get_columns_in_query(select_sql) %}\n {% call statement('get_columns_in_query', fetch_result=True, auto_begin=False) -%}\n select * from (\n {{ select_sql }}\n ) as __dbt_sbq\n where false\n limit 0\n {% endcall %}\n\n {{ return(load_result('get_columns_in_query').table.columns | map(attribute='name') | list) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2970638}, "macro.dbt.alter_column_type": {"unique_id": "macro.dbt.alter_column_type", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "alter_column_type", "macro_sql": "{% macro alter_column_type(relation, column_name, new_column_type) -%}\n {{ return(adapter.dispatch('alter_column_type', 'dbt')(relation, column_name, new_column_type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2975142}, "macro.dbt.default__alter_column_type": {"unique_id": "macro.dbt.default__alter_column_type", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "default__alter_column_type", "macro_sql": "{% macro default__alter_column_type(relation, column_name, new_column_type) -%}\n {#\n 1. Create a new column (w/ temp name and correct type)\n 2. Copy data over to it\n 3. Drop the existing column (cascade!)\n 4. Rename the new column to existing column\n #}\n {%- set tmp_column = column_name + \"__dbt_alter\" -%}\n\n {% call statement('alter_column_type') %}\n alter table {{ relation }} add column {{ adapter.quote(tmp_column) }} {{ new_column_type }};\n update {{ relation }} set {{ adapter.quote(tmp_column) }} = {{ adapter.quote(column_name) }};\n alter table {{ relation }} drop column {{ adapter.quote(column_name) }} cascade;\n alter table {{ relation }} rename column {{ adapter.quote(tmp_column) }} to {{ adapter.quote(column_name) }}\n {% endcall %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2986624}, "macro.dbt.alter_relation_add_remove_columns": {"unique_id": "macro.dbt.alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "alter_relation_add_remove_columns", "macro_sql": "{% macro alter_relation_add_remove_columns(relation, add_columns = none, remove_columns = none) -%}\n {{ return(adapter.dispatch('alter_relation_add_remove_columns', 'dbt')(relation, add_columns, remove_columns)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__alter_relation_add_remove_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.2991476}, "macro.dbt.default__alter_relation_add_remove_columns": {"unique_id": "macro.dbt.default__alter_relation_add_remove_columns", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/columns.sql", "original_file_path": "macros/adapters/columns.sql", "name": "default__alter_relation_add_remove_columns", "macro_sql": "{% macro default__alter_relation_add_remove_columns(relation, add_columns, remove_columns) %}\n\n {% if add_columns is none %}\n {% set add_columns = [] %}\n {% endif %}\n {% if remove_columns is none %}\n {% set remove_columns = [] %}\n {% endif %}\n\n {% set sql -%}\n\n alter {{ relation.type }} {{ relation }}\n\n {% for column in add_columns %}\n add column {{ column.name }} {{ column.data_type }}{{ ',' if not loop.last }}\n {% endfor %}{{ ',' if add_columns and remove_columns }}\n\n {% for column in remove_columns %}\n drop column {{ column.name }}{{ ',' if not loop.last }}\n {% endfor %}\n\n {%- endset -%}\n\n {% do run_query(sql) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.30066}, "macro.dbt.current_timestamp": {"unique_id": "macro.dbt.current_timestamp", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "current_timestamp", "macro_sql": "{% macro current_timestamp() -%}\n {{ adapter.dispatch('current_timestamp', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.301769}, "macro.dbt.default__current_timestamp": {"unique_id": "macro.dbt.default__current_timestamp", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "default__current_timestamp", "macro_sql": "{% macro default__current_timestamp() -%}\n {{ exceptions.raise_not_implemented(\n 'current_timestamp macro not implemented for adapter '+adapter.type()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3020594}, "macro.dbt.collect_freshness": {"unique_id": "macro.dbt.collect_freshness", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "collect_freshness", "macro_sql": "{% macro collect_freshness(source, loaded_at_field, filter) %}\n {{ return(adapter.dispatch('collect_freshness', 'dbt')(source, loaded_at_field, filter))}}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__collect_freshness"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3025067}, "macro.dbt.default__collect_freshness": {"unique_id": "macro.dbt.default__collect_freshness", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/freshness.sql", "original_file_path": "macros/adapters/freshness.sql", "name": "default__collect_freshness", "macro_sql": "{% macro default__collect_freshness(source, loaded_at_field, filter) %}\n {% call statement('collect_freshness', fetch_result=True, auto_begin=False) -%}\n select\n max({{ loaded_at_field }}) as max_loaded_at,\n {{ current_timestamp() }} as snapshotted_at\n from {{ source }}\n {% if filter %}\n where {{ filter }}\n {% endif %}\n {% endcall %}\n {{ return(load_result('collect_freshness').table) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.303318}, "macro.dbt.get_create_index_sql": {"unique_id": "macro.dbt.get_create_index_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "get_create_index_sql", "macro_sql": "{% macro get_create_index_sql(relation, index_dict) -%}\n {{ return(adapter.dispatch('get_create_index_sql', 'dbt')(relation, index_dict)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3044329}, "macro.dbt.default__get_create_index_sql": {"unique_id": "macro.dbt.default__get_create_index_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "default__get_create_index_sql", "macro_sql": "{% macro default__get_create_index_sql(relation, index_dict) -%}\n {% do return(None) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3047094}, "macro.dbt.create_indexes": {"unique_id": "macro.dbt.create_indexes", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "create_indexes", "macro_sql": "{% macro create_indexes(relation) -%}\n {{ adapter.dispatch('create_indexes', 'dbt')(relation) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3050168}, "macro.dbt.default__create_indexes": {"unique_id": "macro.dbt.default__create_indexes", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/indexes.sql", "original_file_path": "macros/adapters/indexes.sql", "name": "default__create_indexes", "macro_sql": "{% macro default__create_indexes(relation) -%}\n {%- set _indexes = config.get('indexes', default=[]) -%}\n\n {% for _index_dict in _indexes %}\n {% set create_index_sql = get_create_index_sql(relation, _index_dict) %}\n {% if create_index_sql %}\n {% do run_query(create_index_sql) %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_create_index_sql", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3057935}, "macro.dbt.get_catalog": {"unique_id": "macro.dbt.get_catalog", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "get_catalog", "macro_sql": "{% macro get_catalog(information_schema, schemas) -%}\n {{ return(adapter.dispatch('get_catalog', 'dbt')(information_schema, schemas)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3084586}, "macro.dbt.default__get_catalog": {"unique_id": "macro.dbt.default__get_catalog", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__get_catalog", "macro_sql": "{% macro default__get_catalog(information_schema, schemas) -%}\n\n {% set typename = adapter.type() %}\n {% set msg -%}\n get_catalog not implemented for {{ typename }}\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3089652}, "macro.dbt.information_schema_name": {"unique_id": "macro.dbt.information_schema_name", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "information_schema_name", "macro_sql": "{% macro information_schema_name(database) %}\n {{ return(adapter.dispatch('information_schema_name', 'dbt')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3093374}, "macro.dbt.default__information_schema_name": {"unique_id": "macro.dbt.default__information_schema_name", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__information_schema_name", "macro_sql": "{% macro default__information_schema_name(database) -%}\n {%- if database -%}\n {{ database }}.INFORMATION_SCHEMA\n {%- else -%}\n INFORMATION_SCHEMA\n {%- endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3096461}, "macro.dbt.list_schemas": {"unique_id": "macro.dbt.list_schemas", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "list_schemas", "macro_sql": "{% macro list_schemas(database) -%}\n {{ return(adapter.dispatch('list_schemas', 'dbt')(database)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.310108}, "macro.dbt.default__list_schemas": {"unique_id": "macro.dbt.default__list_schemas", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__list_schemas", "macro_sql": "{% macro default__list_schemas(database) -%}\n {% set sql %}\n select distinct schema_name\n from {{ information_schema_name(database) }}.SCHEMATA\n where catalog_name ilike '{{ database }}'\n {% endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.information_schema_name", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3106089}, "macro.dbt.check_schema_exists": {"unique_id": "macro.dbt.check_schema_exists", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "check_schema_exists", "macro_sql": "{% macro check_schema_exists(information_schema, schema) -%}\n {{ return(adapter.dispatch('check_schema_exists', 'dbt')(information_schema, schema)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.311002}, "macro.dbt.default__check_schema_exists": {"unique_id": "macro.dbt.default__check_schema_exists", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__check_schema_exists", "macro_sql": "{% macro default__check_schema_exists(information_schema, schema) -%}\n {% set sql -%}\n select count(*)\n from {{ information_schema.replace(information_schema_view='SCHEMATA') }}\n where catalog_name='{{ information_schema.database }}'\n and schema_name='{{ schema }}'\n {%- endset %}\n {{ return(run_query(sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.replace", "macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.311595}, "macro.dbt.list_relations_without_caching": {"unique_id": "macro.dbt.list_relations_without_caching", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "list_relations_without_caching", "macro_sql": "{% macro list_relations_without_caching(schema_relation) %}\n {{ return(adapter.dispatch('list_relations_without_caching', 'dbt')(schema_relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.311958}, "macro.dbt.default__list_relations_without_caching": {"unique_id": "macro.dbt.default__list_relations_without_caching", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/metadata.sql", "original_file_path": "macros/adapters/metadata.sql", "name": "default__list_relations_without_caching", "macro_sql": "{% macro default__list_relations_without_caching(schema_relation) %}\n {{ exceptions.raise_not_implemented(\n 'list_relations_without_caching macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3122962}, "macro.dbt.alter_column_comment": {"unique_id": "macro.dbt.alter_column_comment", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "alter_column_comment", "macro_sql": "{% macro alter_column_comment(relation, column_dict) -%}\n {{ return(adapter.dispatch('alter_column_comment', 'dbt')(relation, column_dict)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3137271}, "macro.dbt.default__alter_column_comment": {"unique_id": "macro.dbt.default__alter_column_comment", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "default__alter_column_comment", "macro_sql": "{% macro default__alter_column_comment(relation, column_dict) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_column_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.314057}, "macro.dbt.alter_relation_comment": {"unique_id": "macro.dbt.alter_relation_comment", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "alter_relation_comment", "macro_sql": "{% macro alter_relation_comment(relation, relation_comment) -%}\n {{ return(adapter.dispatch('alter_relation_comment', 'dbt')(relation, relation_comment)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3144584}, "macro.dbt.default__alter_relation_comment": {"unique_id": "macro.dbt.default__alter_relation_comment", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "default__alter_relation_comment", "macro_sql": "{% macro default__alter_relation_comment(relation, relation_comment) -%}\n {{ exceptions.raise_not_implemented(\n 'alter_relation_comment macro not implemented for adapter '+adapter.type()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.314785}, "macro.dbt.persist_docs": {"unique_id": "macro.dbt.persist_docs", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "persist_docs", "macro_sql": "{% macro persist_docs(relation, model, for_relation=true, for_columns=true) -%}\n {{ return(adapter.dispatch('persist_docs', 'dbt')(relation, model, for_relation, for_columns)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3153055}, "macro.dbt.default__persist_docs": {"unique_id": "macro.dbt.default__persist_docs", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/persist_docs.sql", "original_file_path": "macros/adapters/persist_docs.sql", "name": "default__persist_docs", "macro_sql": "{% macro default__persist_docs(relation, model, for_relation, for_columns) -%}\n {% if for_relation and config.persist_relation_docs() and model.description %}\n {% do run_query(alter_relation_comment(relation, model.description)) %}\n {% endif %}\n\n {% if for_columns and config.persist_column_docs() and model.columns %}\n {% do run_query(alter_column_comment(relation, model.columns)) %}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_query", "macro.dbt.alter_relation_comment", "macro.dbt.alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3162248}, "macro.dbt.make_intermediate_relation": {"unique_id": "macro.dbt.make_intermediate_relation", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "make_intermediate_relation", "macro_sql": "{% macro make_intermediate_relation(base_relation, suffix='__dbt_tmp') %}\n {{ return(adapter.dispatch('make_intermediate_relation', 'dbt')(base_relation, suffix)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__make_intermediate_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3215444}, "macro.dbt.default__make_intermediate_relation": {"unique_id": "macro.dbt.default__make_intermediate_relation", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__make_intermediate_relation", "macro_sql": "{% macro default__make_intermediate_relation(base_relation, suffix) %}\n {{ return(default__make_temp_relation(base_relation, suffix)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3218749}, "macro.dbt.make_temp_relation": {"unique_id": "macro.dbt.make_temp_relation", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "make_temp_relation", "macro_sql": "{% macro make_temp_relation(base_relation, suffix='__dbt_tmp') %}\n {{ return(adapter.dispatch('make_temp_relation', 'dbt')(base_relation, suffix)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3223066}, "macro.dbt.default__make_temp_relation": {"unique_id": "macro.dbt.default__make_temp_relation", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__make_temp_relation", "macro_sql": "{% macro default__make_temp_relation(base_relation, suffix) %}\n {%- set temp_identifier = base_relation.identifier ~ suffix -%}\n {%- set temp_relation = base_relation.incorporate(\n path={\"identifier\": temp_identifier}) -%}\n\n {{ return(temp_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3228567}, "macro.dbt.make_backup_relation": {"unique_id": "macro.dbt.make_backup_relation", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "make_backup_relation", "macro_sql": "{% macro make_backup_relation(base_relation, backup_relation_type, suffix='__dbt_backup') %}\n {{ return(adapter.dispatch('make_backup_relation', 'dbt')(base_relation, backup_relation_type, suffix)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__make_backup_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3233383}, "macro.dbt.default__make_backup_relation": {"unique_id": "macro.dbt.default__make_backup_relation", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__make_backup_relation", "macro_sql": "{% macro default__make_backup_relation(base_relation, backup_relation_type, suffix) %}\n {%- set backup_identifier = base_relation.identifier ~ suffix -%}\n {%- set backup_relation = base_relation.incorporate(\n path={\"identifier\": backup_identifier},\n type=backup_relation_type\n ) -%}\n {{ return(backup_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.323942}, "macro.dbt.drop_relation": {"unique_id": "macro.dbt.drop_relation", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "drop_relation", "macro_sql": "{% macro drop_relation(relation) -%}\n {{ return(adapter.dispatch('drop_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3243184}, "macro.dbt.default__drop_relation": {"unique_id": "macro.dbt.default__drop_relation", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__drop_relation", "macro_sql": "{% macro default__drop_relation(relation) -%}\n {% call statement('drop_relation', auto_begin=False) -%}\n drop {{ relation.type }} if exists {{ relation }} cascade\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.324738}, "macro.dbt.truncate_relation": {"unique_id": "macro.dbt.truncate_relation", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "truncate_relation", "macro_sql": "{% macro truncate_relation(relation) -%}\n {{ return(adapter.dispatch('truncate_relation', 'dbt')(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__truncate_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3250864}, "macro.dbt.default__truncate_relation": {"unique_id": "macro.dbt.default__truncate_relation", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__truncate_relation", "macro_sql": "{% macro default__truncate_relation(relation) -%}\n {% call statement('truncate_relation') -%}\n truncate table {{ relation }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3254218}, "macro.dbt.rename_relation": {"unique_id": "macro.dbt.rename_relation", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "rename_relation", "macro_sql": "{% macro rename_relation(from_relation, to_relation) -%}\n {{ return(adapter.dispatch('rename_relation', 'dbt')(from_relation, to_relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3258097}, "macro.dbt.default__rename_relation": {"unique_id": "macro.dbt.default__rename_relation", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__rename_relation", "macro_sql": "{% macro default__rename_relation(from_relation, to_relation) -%}\n {% set target_name = adapter.quote_as_configured(to_relation.identifier, 'identifier') %}\n {% call statement('rename_relation') -%}\n alter table {{ from_relation }} rename to {{ target_name }}\n {%- endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3264816}, "macro.dbt.get_or_create_relation": {"unique_id": "macro.dbt.get_or_create_relation", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "get_or_create_relation", "macro_sql": "{% macro get_or_create_relation(database, schema, identifier, type) -%}\n {{ return(adapter.dispatch('get_or_create_relation', 'dbt')(database, schema, identifier, type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_or_create_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3269606}, "macro.dbt.default__get_or_create_relation": {"unique_id": "macro.dbt.default__get_or_create_relation", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "default__get_or_create_relation", "macro_sql": "{% macro default__get_or_create_relation(database, schema, identifier, type) %}\n {%- set target_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n\n {% if target_relation %}\n {% do return([true, target_relation]) %}\n {% endif %}\n\n {%- set new_relation = api.Relation.create(\n database=database,\n schema=schema,\n identifier=identifier,\n type=type\n ) -%}\n {% do return([false, new_relation]) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3280032}, "macro.dbt.load_cached_relation": {"unique_id": "macro.dbt.load_cached_relation", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "load_cached_relation", "macro_sql": "{% macro load_cached_relation(relation) %}\n {% do return(adapter.get_relation(\n database=relation.database,\n schema=relation.schema,\n identifier=relation.identifier\n )) -%}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3284717}, "macro.dbt.load_relation": {"unique_id": "macro.dbt.load_relation", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "load_relation", "macro_sql": "{% macro load_relation(relation) %}\n {{ return(load_cached_relation(relation)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.load_cached_relation"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3287568}, "macro.dbt.drop_relation_if_exists": {"unique_id": "macro.dbt.drop_relation_if_exists", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/relation.sql", "original_file_path": "macros/adapters/relation.sql", "name": "drop_relation_if_exists", "macro_sql": "{% macro drop_relation_if_exists(relation) %}\n {% if relation is not none %}\n {{ adapter.drop_relation(relation) }}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3291295}, "macro.dbt.create_schema": {"unique_id": "macro.dbt.create_schema", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "create_schema", "macro_sql": "{% macro create_schema(relation) -%}\n {{ adapter.dispatch('create_schema', 'dbt')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.330106}, "macro.dbt.default__create_schema": {"unique_id": "macro.dbt.default__create_schema", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "default__create_schema", "macro_sql": "{% macro default__create_schema(relation) -%}\n {%- call statement('create_schema') -%}\n create schema if not exists {{ relation.without_identifier() }}\n {% endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.330481}, "macro.dbt.drop_schema": {"unique_id": "macro.dbt.drop_schema", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "drop_schema", "macro_sql": "{% macro drop_schema(relation) -%}\n {{ adapter.dispatch('drop_schema', 'dbt')(relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3307958}, "macro.dbt.default__drop_schema": {"unique_id": "macro.dbt.default__drop_schema", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/adapters/schema.sql", "original_file_path": "macros/adapters/schema.sql", "name": "default__drop_schema", "macro_sql": "{% macro default__drop_schema(relation) -%}\n {%- call statement('drop_schema') -%}\n drop schema if exists {{ relation.without_identifier() }} cascade\n {% endcall %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3311532}, "macro.dbt.convert_datetime": {"unique_id": "macro.dbt.convert_datetime", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "convert_datetime", "macro_sql": "{% macro convert_datetime(date_str, date_fmt) %}\n\n {% set error_msg -%}\n The provided partition date '{{ date_str }}' does not match the expected format '{{ date_fmt }}'\n {%- endset %}\n\n {% set res = try_or_compiler_error(error_msg, modules.datetime.datetime.strptime, date_str.strip(), date_fmt) %}\n {{ return(res) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3343215}, "macro.dbt.dates_in_range": {"unique_id": "macro.dbt.dates_in_range", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "dates_in_range", "macro_sql": "{% macro dates_in_range(start_date_str, end_date_str=none, in_fmt=\"%Y%m%d\", out_fmt=\"%Y%m%d\") %}\n {% set end_date_str = start_date_str if end_date_str is none else end_date_str %}\n\n {% set start_date = convert_datetime(start_date_str, in_fmt) %}\n {% set end_date = convert_datetime(end_date_str, in_fmt) %}\n\n {% set day_count = (end_date - start_date).days %}\n {% if day_count < 0 %}\n {% set msg -%}\n Partiton start date is after the end date ({{ start_date }}, {{ end_date }})\n {%- endset %}\n\n {{ exceptions.raise_compiler_error(msg, model) }}\n {% endif %}\n\n {% set date_list = [] %}\n {% for i in range(0, day_count + 1) %}\n {% set the_date = (modules.datetime.timedelta(days=i) + start_date) %}\n {% if not out_fmt %}\n {% set _ = date_list.append(the_date) %}\n {% else %}\n {% set _ = date_list.append(the_date.strftime(out_fmt)) %}\n {% endif %}\n {% endfor %}\n\n {{ return(date_list) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.convert_datetime"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3365793}, "macro.dbt.partition_range": {"unique_id": "macro.dbt.partition_range", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "partition_range", "macro_sql": "{% macro partition_range(raw_partition_date, date_fmt='%Y%m%d') %}\n {% set partition_range = (raw_partition_date | string).split(\",\") %}\n\n {% if (partition_range | length) == 1 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = none %}\n {% elif (partition_range | length) == 2 %}\n {% set start_date = partition_range[0] %}\n {% set end_date = partition_range[1] %}\n {% else %}\n {{ exceptions.raise_compiler_error(\"Invalid partition time. Expected format: {Start Date}[,{End Date}]. Got: \" ~ raw_partition_date) }}\n {% endif %}\n\n {{ return(dates_in_range(start_date, end_date, in_fmt=date_fmt)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dates_in_range"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3380136}, "macro.dbt.py_current_timestring": {"unique_id": "macro.dbt.py_current_timestring", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/etc/datetime.sql", "original_file_path": "macros/etc/datetime.sql", "name": "py_current_timestring", "macro_sql": "{% macro py_current_timestring() %}\n {% set dt = modules.datetime.datetime.now() %}\n {% do return(dt.strftime(\"%Y%m%d%H%M%S%f\")) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3384812}, "macro.dbt.statement": {"unique_id": "macro.dbt.statement", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "statement", "macro_sql": "{% macro statement(name=None, fetch_result=False, auto_begin=True) -%}\n {%- if execute: -%}\n {%- set sql = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime SQL for node \"{}\"'.format(model['unique_id'])) }}\n {{ write(sql) }}\n {%- endif -%}\n\n {%- set res, table = adapter.execute(sql, auto_begin=auto_begin, fetch=fetch_result) -%}\n {%- if name is not none -%}\n {{ store_result(name, response=res, agate_table=table) }}\n {%- endif -%}\n\n {%- endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3407474}, "macro.dbt.noop_statement": {"unique_id": "macro.dbt.noop_statement", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "noop_statement", "macro_sql": "{% macro noop_statement(name=None, message=None, code=None, rows_affected=None, res=None) -%}\n {%- set sql = caller() -%}\n\n {%- if name == 'main' -%}\n {{ log('Writing runtime SQL for node \"{}\"'.format(model['unique_id'])) }}\n {{ write(sql) }}\n {%- endif -%}\n\n {%- if name is not none -%}\n {{ store_raw_result(name, message=message, code=code, rows_affected=rows_affected, agate_table=res) }}\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3418515}, "macro.dbt.run_query": {"unique_id": "macro.dbt.run_query", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/etc/statement.sql", "original_file_path": "macros/etc/statement.sql", "name": "run_query", "macro_sql": "{% macro run_query(sql) %}\n {% call statement(\"run_query_statement\", fetch_result=true, auto_begin=false) %}\n {{ sql }}\n {% endcall %}\n\n {% do return(load_result(\"run_query_statement\").table) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3424292}, "macro.dbt.default__test_accepted_values": {"unique_id": "macro.dbt.default__test_accepted_values", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/accepted_values.sql", "original_file_path": "macros/generic_test_sql/accepted_values.sql", "name": "default__test_accepted_values", "macro_sql": "{% macro default__test_accepted_values(model, column_name, values, quote=True) %}\n\nwith all_values as (\n\n select\n {{ column_name }} as value_field,\n count(*) as n_records\n\n from {{ model }}\n group by {{ column_name }}\n\n)\n\nselect *\nfrom all_values\nwhere value_field not in (\n {% for value in values -%}\n {% if quote -%}\n '{{ value }}'\n {%- else -%}\n {{ value }}\n {%- endif -%}\n {%- if not loop.last -%},{%- endif %}\n {%- endfor %}\n)\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3437674}, "macro.dbt.default__test_not_null": {"unique_id": "macro.dbt.default__test_not_null", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/not_null.sql", "original_file_path": "macros/generic_test_sql/not_null.sql", "name": "default__test_not_null", "macro_sql": "{% macro default__test_not_null(model, column_name) %}\n\n{% set column_list = '*' if should_store_failures() else column_name %}\n\nselect {{ column_list }}\nfrom {{ model }}\nwhere {{ column_name }} is null\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_store_failures"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3446388}, "macro.dbt.default__test_relationships": {"unique_id": "macro.dbt.default__test_relationships", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/relationships.sql", "original_file_path": "macros/generic_test_sql/relationships.sql", "name": "default__test_relationships", "macro_sql": "{% macro default__test_relationships(model, column_name, to, field) %}\n\nwith child as (\n select {{ column_name }} as from_field\n from {{ model }}\n where {{ column_name }} is not null\n),\n\nparent as (\n select {{ field }} as to_field\n from {{ to }}\n)\n\nselect\n from_field\n\nfrom child\nleft join parent\n on child.from_field = parent.to_field\n\nwhere parent.to_field is null\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.345559}, "macro.dbt.default__test_unique": {"unique_id": "macro.dbt.default__test_unique", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/generic_test_sql/unique.sql", "original_file_path": "macros/generic_test_sql/unique.sql", "name": "default__test_unique", "macro_sql": "{% macro default__test_unique(model, column_name) %}\n\nselect\n {{ column_name }} as unique_field,\n count(*) as n_records\n\nfrom {{ model }}\nwhere {{ column_name }} is not null\ngroup by {{ column_name }}\nhaving count(*) > 1\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.376326}, "macro.dbt.generate_alias_name": {"unique_id": "macro.dbt.generate_alias_name", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "name": "generate_alias_name", "macro_sql": "{% macro generate_alias_name(custom_alias_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_alias_name', 'dbt')(custom_alias_name, node)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_alias_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.377298}, "macro.dbt.default__generate_alias_name": {"unique_id": "macro.dbt.default__generate_alias_name", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_alias.sql", "original_file_path": "macros/get_custom_name/get_custom_alias.sql", "name": "default__generate_alias_name", "macro_sql": "{% macro default__generate_alias_name(custom_alias_name=none, node=none) -%}\n\n {%- if custom_alias_name is none -%}\n\n {{ node.name }}\n\n {%- else -%}\n\n {{ custom_alias_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3777483}, "macro.dbt.generate_database_name": {"unique_id": "macro.dbt.generate_database_name", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "name": "generate_database_name", "macro_sql": "{% macro generate_database_name(custom_database_name=none, node=none) -%}\n {% do return(adapter.dispatch('generate_database_name', 'dbt')(custom_database_name, node)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_database_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3787572}, "macro.dbt.default__generate_database_name": {"unique_id": "macro.dbt.default__generate_database_name", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_database.sql", "original_file_path": "macros/get_custom_name/get_custom_database.sql", "name": "default__generate_database_name", "macro_sql": "{% macro default__generate_database_name(custom_database_name=none, node=none) -%}\n {%- set default_database = target.database -%}\n {%- if custom_database_name is none -%}\n\n {{ default_database }}\n\n {%- else -%}\n\n {{ custom_database_name }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3793988}, "macro.dbt.generate_schema_name": {"unique_id": "macro.dbt.generate_schema_name", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "generate_schema_name", "macro_sql": "{% macro generate_schema_name(custom_schema_name=none, node=none) -%}\n {{ return(adapter.dispatch('generate_schema_name', 'dbt')(custom_schema_name, node)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__generate_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.380601}, "macro.dbt.default__generate_schema_name": {"unique_id": "macro.dbt.default__generate_schema_name", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "default__generate_schema_name", "macro_sql": "{% macro default__generate_schema_name(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if custom_schema_name is none -%}\n\n {{ default_schema }}\n\n {%- else -%}\n\n {{ default_schema }}_{{ custom_schema_name | trim }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3811107}, "macro.dbt.generate_schema_name_for_env": {"unique_id": "macro.dbt.generate_schema_name_for_env", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/get_custom_name/get_custom_schema.sql", "original_file_path": "macros/get_custom_name/get_custom_schema.sql", "name": "generate_schema_name_for_env", "macro_sql": "{% macro generate_schema_name_for_env(custom_schema_name, node) -%}\n\n {%- set default_schema = target.schema -%}\n {%- if target.name == 'prod' and custom_schema_name is not none -%}\n\n {{ custom_schema_name | trim }}\n\n {%- else -%}\n\n {{ default_schema }}\n\n {%- endif -%}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3816717}, "macro.dbt.set_sql_header": {"unique_id": "macro.dbt.set_sql_header", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "set_sql_header", "macro_sql": "{% macro set_sql_header(config) -%}\n {{ config.set('sql_header', caller()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3826246}, "macro.dbt.should_full_refresh": {"unique_id": "macro.dbt.should_full_refresh", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "should_full_refresh", "macro_sql": "{% macro should_full_refresh() %}\n {% set config_full_refresh = config.get('full_refresh') %}\n {% if config_full_refresh is none %}\n {% set config_full_refresh = flags.FULL_REFRESH %}\n {% endif %}\n {% do return(config_full_refresh) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3832064}, "macro.dbt.should_store_failures": {"unique_id": "macro.dbt.should_store_failures", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/configs.sql", "original_file_path": "macros/materializations/configs.sql", "name": "should_store_failures", "macro_sql": "{% macro should_store_failures() %}\n {% set config_store_failures = config.get('store_failures') %}\n {% if config_store_failures is none %}\n {% set config_store_failures = flags.STORE_FAILURES %}\n {% endif %}\n {% do return(config_store_failures) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3838074}, "macro.dbt.run_hooks": {"unique_id": "macro.dbt.run_hooks", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "run_hooks", "macro_sql": "{% macro run_hooks(hooks, inside_transaction=True) %}\n {% for hook in hooks | selectattr('transaction', 'equalto', inside_transaction) %}\n {% if not inside_transaction and loop.first %}\n {% call statement(auto_begin=inside_transaction) %}\n commit;\n {% endcall %}\n {% endif %}\n {% set rendered = render(hook.get('sql')) | trim %}\n {% if (rendered | length) > 0 %}\n {% call statement(auto_begin=inside_transaction) %}\n {{ rendered }}\n {% endcall %}\n {% endif %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3860106}, "macro.dbt.make_hook_config": {"unique_id": "macro.dbt.make_hook_config", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "make_hook_config", "macro_sql": "{% macro make_hook_config(sql, inside_transaction) %}\n {{ tojson({\"sql\": sql, \"transaction\": inside_transaction}) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3864145}, "macro.dbt.before_begin": {"unique_id": "macro.dbt.before_begin", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "before_begin", "macro_sql": "{% macro before_begin(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3867009}, "macro.dbt.in_transaction": {"unique_id": "macro.dbt.in_transaction", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "in_transaction", "macro_sql": "{% macro in_transaction(sql) %}\n {{ make_hook_config(sql, inside_transaction=True) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.386979}, "macro.dbt.after_commit": {"unique_id": "macro.dbt.after_commit", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/hooks.sql", "original_file_path": "macros/materializations/hooks.sql", "name": "after_commit", "macro_sql": "{% macro after_commit(sql) %}\n {{ make_hook_config(sql, inside_transaction=False) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_hook_config"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3872712}, "macro.dbt.get_quoted_csv": {"unique_id": "macro.dbt.get_quoted_csv", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "get_quoted_csv", "macro_sql": "{% macro get_quoted_csv(column_names) %}\n\n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote(col)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3889663}, "macro.dbt.diff_columns": {"unique_id": "macro.dbt.diff_columns", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "diff_columns", "macro_sql": "{% macro diff_columns(source_columns, target_columns) %}\n\n {% set result = [] %}\n {% set source_names = source_columns | map(attribute = 'column') | list %}\n {% set target_names = target_columns | map(attribute = 'column') | list %}\n\n {# --check whether the name attribute exists in the target - this does not perform a data type check #}\n {% for sc in source_columns %}\n {% if sc.name not in target_names %}\n {{ result.append(sc) }}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3900137}, "macro.dbt.diff_column_data_types": {"unique_id": "macro.dbt.diff_column_data_types", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/column_helpers.sql", "original_file_path": "macros/materializations/models/incremental/column_helpers.sql", "name": "diff_column_data_types", "macro_sql": "{% macro diff_column_data_types(source_columns, target_columns) %}\n\n {% set result = [] %}\n {% for sc in source_columns %}\n {% set tc = target_columns | selectattr(\"name\", \"equalto\", sc.name) | list | first %}\n {% if tc %}\n {% if sc.data_type != tc.data_type %}\n {{ result.append( { 'column_name': tc.name, 'new_type': sc.data_type } ) }}\n {% endif %}\n {% endif %}\n {% endfor %}\n\n {{ return(result) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3911943}, "macro.dbt.materialization_incremental_default": {"unique_id": "macro.dbt.materialization_incremental_default", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/incremental.sql", "original_file_path": "macros/materializations/models/incremental/incremental.sql", "name": "materialization_incremental_default", "macro_sql": "{% materialization incremental, default -%}\n\n -- relations\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='table') -%}\n {%- set temp_relation = make_temp_relation(target_relation)-%}\n {%- set intermediate_relation = make_intermediate_relation(target_relation)-%}\n {%- set backup_relation_type = 'table' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n\n -- configs\n {%- set unique_key = config.get('unique_key') -%}\n {%- set full_refresh_mode = (should_full_refresh() or existing_relation.is_view) -%}\n {%- set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') -%}\n\n -- the temp_ and backup_ relations should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation. This has to happen before\n -- BEGIN, in a separate transaction\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation)-%}\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set to_drop = [] %}\n\n {% if existing_relation is none %}\n {% set build_sql = get_create_table_as_sql(False, target_relation, sql) %}\n {% elif full_refresh_mode %}\n {% set build_sql = get_create_table_as_sql(False, intermediate_relation, sql) %}\n {% set need_swap = true %}\n {% else %}\n {% do run_query(get_create_table_as_sql(True, temp_relation, sql)) %}\n {% do adapter.expand_target_column_types(\n from_relation=temp_relation,\n to_relation=target_relation) %}\n {#-- Process schema changes. Returns dict of changes if successful. Use source columns for upserting/merging --#}\n {% set dest_columns = process_schema_changes(on_schema_change, temp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n {% set build_sql = get_delete_insert_merge_sql(target_relation, temp_relation, unique_key, dest_columns) %}\n\n {% endif %}\n\n {% call statement(\"main\") %}\n {{ build_sql }}\n {% endcall %}\n\n {% if need_swap %}\n {% do adapter.rename_relation(target_relation, backup_relation) %}\n {% do adapter.rename_relation(intermediate_relation, target_relation) %}\n {% do to_drop.append(backup_relation) %}\n {% endif %}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if existing_relation is none or existing_relation.is_view or should_full_refresh() %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {% do adapter.commit() %}\n\n {% for rel in to_drop %}\n {% do adapter.drop_relation(rel) %}\n {% endfor %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_temp_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.should_full_refresh", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.get_create_table_as_sql", "macro.dbt.run_query", "macro.dbt.process_schema_changes", "macro.dbt.get_delete_insert_merge_sql", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.3993082}, "macro.dbt.is_incremental": {"unique_id": "macro.dbt.is_incremental", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/is_incremental.sql", "original_file_path": "macros/materializations/models/incremental/is_incremental.sql", "name": "is_incremental", "macro_sql": "{% macro is_incremental() %}\n {#-- do not run introspective queries in parsing #}\n {% if not execute %}\n {{ return(False) }}\n {% else %}\n {% set relation = adapter.get_relation(this.database, this.schema, this.table) %}\n {{ return(relation is not none\n and relation.type == 'table'\n and model.config.materialized == 'incremental'\n and not should_full_refresh()) }}\n {% endif %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_full_refresh"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4007745}, "macro.dbt.get_merge_sql": {"unique_id": "macro.dbt.get_merge_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_merge_sql", "macro_sql": "{% macro get_merge_sql(target, source, unique_key, dest_columns, predicates=none) -%}\n {{ adapter.dispatch('get_merge_sql', 'dbt')(target, source, unique_key, dest_columns, predicates) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4086332}, "macro.dbt.default__get_merge_sql": {"unique_id": "macro.dbt.default__get_merge_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_merge_sql", "macro_sql": "{% macro default__get_merge_sql(target, source, unique_key, dest_columns, predicates) -%}\n {%- set predicates = [] if predicates is none else [] + predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set update_columns = config.get('merge_update_columns', default = dest_columns | map(attribute=\"quoted\") | list) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {% if unique_key %}\n {% if unique_key is sequence and unique_key is not mapping and unique_key is not string %}\n {% for key in unique_key %}\n {% set this_key_match %}\n DBT_INTERNAL_SOURCE.{{ key }} = DBT_INTERNAL_DEST.{{ key }}\n {% endset %}\n {% do predicates.append(this_key_match) %}\n {% endfor %}\n {% else %}\n {% set unique_key_match %}\n DBT_INTERNAL_SOURCE.{{ unique_key }} = DBT_INTERNAL_DEST.{{ unique_key }}\n {% endset %}\n {% do predicates.append(unique_key_match) %}\n {% endif %}\n {% else %}\n {% do predicates.append('FALSE') %}\n {% endif %}\n\n {{ sql_header if sql_header is not none }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on {{ predicates | join(' and ') }}\n\n {% if unique_key %}\n when matched then update set\n {% for column_name in update_columns -%}\n {{ column_name }} = DBT_INTERNAL_SOURCE.{{ column_name }}\n {%- if not loop.last %}, {%- endif %}\n {%- endfor %}\n {% endif %}\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4114532}, "macro.dbt.get_delete_insert_merge_sql": {"unique_id": "macro.dbt.get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_delete_insert_merge_sql", "macro_sql": "{% macro get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n {{ adapter.dispatch('get_delete_insert_merge_sql', 'dbt')(target, source, unique_key, dest_columns) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4119146}, "macro.dbt.default__get_delete_insert_merge_sql": {"unique_id": "macro.dbt.default__get_delete_insert_merge_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_delete_insert_merge_sql", "macro_sql": "{% macro default__get_delete_insert_merge_sql(target, source, unique_key, dest_columns) -%}\n\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n\n {% if unique_key %}\n {% if unique_key is sequence and unique_key is not string %}\n delete from {{target }}\n using {{ source }}\n where (\n {% for key in unique_key %}\n {{ source }}.{{ key }} = {{ target }}.{{ key }}\n {{ \"and \" if not loop.last }}\n {% endfor %}\n );\n {% else %}\n delete from {{ target }}\n where (\n {{ unique_key }}) in (\n select ({{ unique_key }})\n from {{ source }}\n );\n\n {% endif %}\n {% endif %}\n\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4133534}, "macro.dbt.get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "get_insert_overwrite_merge_sql", "macro_sql": "{% macro get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header=false) -%}\n {{ adapter.dispatch('get_insert_overwrite_merge_sql', 'dbt')(target, source, dest_columns, predicates, include_sql_header) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_insert_overwrite_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4138596}, "macro.dbt.default__get_insert_overwrite_merge_sql": {"unique_id": "macro.dbt.default__get_insert_overwrite_merge_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/merge.sql", "original_file_path": "macros/materializations/models/incremental/merge.sql", "name": "default__get_insert_overwrite_merge_sql", "macro_sql": "{% macro default__get_insert_overwrite_merge_sql(target, source, dest_columns, predicates, include_sql_header) -%}\n {%- set predicates = [] if predicates is none else [] + predicates -%}\n {%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute=\"name\")) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none and include_sql_header }}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on FALSE\n\n when not matched by source\n {% if predicates %} and {{ predicates | join(' and ') }} {% endif %}\n then delete\n\n when not matched then insert\n ({{ dest_cols_csv }})\n values\n ({{ dest_cols_csv }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4150517}, "macro.dbt.incremental_validate_on_schema_change": {"unique_id": "macro.dbt.incremental_validate_on_schema_change", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "incremental_validate_on_schema_change", "macro_sql": "{% macro incremental_validate_on_schema_change(on_schema_change, default='ignore') %}\n\n {% if on_schema_change not in ['sync_all_columns', 'append_new_columns', 'fail', 'ignore'] %}\n\n {% set log_message = 'Invalid value for on_schema_change (%s) specified. Setting default value of %s.' % (on_schema_change, default) %}\n {% do log(log_message) %}\n\n {{ return(default) }}\n\n {% else %}\n\n {{ return(on_schema_change) }}\n\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.42242}, "macro.dbt.check_for_schema_changes": {"unique_id": "macro.dbt.check_for_schema_changes", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "check_for_schema_changes", "macro_sql": "{% macro check_for_schema_changes(source_relation, target_relation) %}\n\n {% set schema_changed = False %}\n\n {%- set source_columns = adapter.get_columns_in_relation(source_relation) -%}\n {%- set target_columns = adapter.get_columns_in_relation(target_relation) -%}\n {%- set source_not_in_target = diff_columns(source_columns, target_columns) -%}\n {%- set target_not_in_source = diff_columns(target_columns, source_columns) -%}\n\n {% set new_target_types = diff_column_data_types(source_columns, target_columns) %}\n\n {% if source_not_in_target != [] %}\n {% set schema_changed = True %}\n {% elif target_not_in_source != [] or new_target_types != [] %}\n {% set schema_changed = True %}\n {% elif new_target_types != [] %}\n {% set schema_changed = True %}\n {% endif %}\n\n {% set changes_dict = {\n 'schema_changed': schema_changed,\n 'source_not_in_target': source_not_in_target,\n 'target_not_in_source': target_not_in_source,\n 'source_columns': source_columns,\n 'target_columns': target_columns,\n 'new_target_types': new_target_types\n } %}\n\n {% set msg %}\n In {{ target_relation }}:\n Schema changed: {{ schema_changed }}\n Source columns not in target: {{ source_not_in_target }}\n Target columns not in source: {{ target_not_in_source }}\n New column types: {{ new_target_types }}\n {% endset %}\n\n {% do log(msg) %}\n\n {{ return(changes_dict) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.diff_columns", "macro.dbt.diff_column_data_types"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4247184}, "macro.dbt.sync_column_schemas": {"unique_id": "macro.dbt.sync_column_schemas", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "sync_column_schemas", "macro_sql": "{% macro sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n\n {%- set add_to_target_arr = schema_changes_dict['source_not_in_target'] -%}\n\n {%- if on_schema_change == 'append_new_columns'-%}\n {%- if add_to_target_arr | length > 0 -%}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, none) -%}\n {%- endif -%}\n\n {% elif on_schema_change == 'sync_all_columns' %}\n {%- set remove_from_target_arr = schema_changes_dict['target_not_in_source'] -%}\n {%- set new_target_types = schema_changes_dict['new_target_types'] -%}\n\n {% if add_to_target_arr | length > 0 or remove_from_target_arr | length > 0 %}\n {%- do alter_relation_add_remove_columns(target_relation, add_to_target_arr, remove_from_target_arr) -%}\n {% endif %}\n\n {% if new_target_types != [] %}\n {% for ntt in new_target_types %}\n {% set column_name = ntt['column_name'] %}\n {% set new_type = ntt['new_type'] %}\n {% do alter_column_type(target_relation, column_name, new_type) %}\n {% endfor %}\n {% endif %}\n\n {% endif %}\n\n {% set schema_change_message %}\n In {{ target_relation }}:\n Schema change approach: {{ on_schema_change }}\n Columns added: {{ add_to_target_arr }}\n Columns removed: {{ remove_from_target_arr }}\n Data types changed: {{ new_target_types }}\n {% endset %}\n\n {% do log(schema_change_message) %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.alter_relation_add_remove_columns", "macro.dbt.alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4271119}, "macro.dbt.process_schema_changes": {"unique_id": "macro.dbt.process_schema_changes", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/incremental/on_schema_change.sql", "original_file_path": "macros/materializations/models/incremental/on_schema_change.sql", "name": "process_schema_changes", "macro_sql": "{% macro process_schema_changes(on_schema_change, source_relation, target_relation) %}\n\n {% if on_schema_change == 'ignore' %}\n\n {{ return({}) }}\n\n {% else %}\n\n {% set schema_changes_dict = check_for_schema_changes(source_relation, target_relation) %}\n\n {% if schema_changes_dict['schema_changed'] %}\n\n {% if on_schema_change == 'fail' %}\n\n {% set fail_msg %}\n The source and target schemas on this incremental model are out of sync!\n They can be reconciled in several ways:\n - set the `on_schema_change` config to either append_new_columns or sync_all_columns, depending on your situation.\n - Re-run the incremental model with `full_refresh: True` to update the target schema.\n - update the schema manually and re-run the process.\n {% endset %}\n\n {% do exceptions.raise_compiler_error(fail_msg) %}\n\n {# -- unless we ignore, run the sync operation per the config #}\n {% else %}\n\n {% do sync_column_schemas(on_schema_change, target_relation, schema_changes_dict) %}\n\n {% endif %}\n\n {% endif %}\n\n {{ return(schema_changes_dict['source_columns']) }}\n\n {% endif %}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.check_for_schema_changes", "macro.dbt.sync_column_schemas"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4285216}, "macro.dbt.get_create_table_as_sql": {"unique_id": "macro.dbt.get_create_table_as_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "get_create_table_as_sql", "macro_sql": "{% macro get_create_table_as_sql(temporary, relation, sql) -%}\n {{ adapter.dispatch('get_create_table_as_sql', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_table_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4295835}, "macro.dbt.default__get_create_table_as_sql": {"unique_id": "macro.dbt.default__get_create_table_as_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "default__get_create_table_as_sql", "macro_sql": "{% macro default__get_create_table_as_sql(temporary, relation, sql) -%}\n {{ return(create_table_as(temporary, relation, sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4299388}, "macro.dbt.create_table_as": {"unique_id": "macro.dbt.create_table_as", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "create_table_as", "macro_sql": "{% macro create_table_as(temporary, relation, sql) -%}\n {{ adapter.dispatch('create_table_as', 'dbt')(temporary, relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4303374}, "macro.dbt.default__create_table_as": {"unique_id": "macro.dbt.default__create_table_as", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/create_table_as.sql", "original_file_path": "macros/materializations/models/table/create_table_as.sql", "name": "default__create_table_as", "macro_sql": "{% macro default__create_table_as(temporary, relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n\n create {% if temporary: -%}temporary{%- endif %} table\n {{ relation.include(database=(not temporary), schema=(not temporary)) }}\n as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4311101}, "macro.dbt.materialization_table_default": {"unique_id": "macro.dbt.materialization_table_default", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/table/table.sql", "original_file_path": "macros/materializations/models/table/table.sql", "name": "materialization_table_default", "macro_sql": "{% materialization table, default %}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='table') %}\n {%- set intermediate_relation = make_intermediate_relation(target_relation) -%}\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) -%}\n /*\n See ../view/view.sql for more information about this relation.\n */\n {%- set backup_relation_type = 'table' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_table_as_sql(False, intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n {% if existing_relation is not none %}\n {{ adapter.rename_relation(existing_relation, backup_relation) }}\n {% endif %}\n\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% do create_indexes(target_relation) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n -- finally, drop the existing/backup relation after the commit\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.get_create_table_as_sql", "macro.dbt.create_indexes", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4358873}, "macro.dbt.create_or_replace_view": {"unique_id": "macro.dbt.create_or_replace_view", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_or_replace_view.sql", "original_file_path": "macros/materializations/models/view/create_or_replace_view.sql", "name": "create_or_replace_view", "macro_sql": "{% macro create_or_replace_view() %}\n {%- set identifier = model['alias'] -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database,\n type='view') -%}\n {% set grant_config = config.get('grants') %}\n\n {{ run_hooks(pre_hooks) }}\n\n -- If there's a table with the same name and we weren't told to full refresh,\n -- that's an error. If we were told to full refresh, drop it. This behavior differs\n -- for Snowflake and BigQuery, so multiple dispatch is used.\n {%- if old_relation is not none and old_relation.is_table -%}\n {{ handle_existing_table(should_full_refresh(), old_relation) }}\n {%- endif -%}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_view_as_sql(target_relation, sql) }}\n {%- endcall %}\n\n {% set should_revoke = should_revoke(exists_as_view, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=True) %}\n\n {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.run_hooks", "macro.dbt.handle_existing_table", "macro.dbt.should_full_refresh", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4388685}, "macro.dbt.get_create_view_as_sql": {"unique_id": "macro.dbt.get_create_view_as_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "get_create_view_as_sql", "macro_sql": "{% macro get_create_view_as_sql(relation, sql) -%}\n {{ adapter.dispatch('get_create_view_as_sql', 'dbt')(relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_create_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4398203}, "macro.dbt.default__get_create_view_as_sql": {"unique_id": "macro.dbt.default__get_create_view_as_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "default__get_create_view_as_sql", "macro_sql": "{% macro default__get_create_view_as_sql(relation, sql) -%}\n {{ return(create_view_as(relation, sql)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.440135}, "macro.dbt.create_view_as": {"unique_id": "macro.dbt.create_view_as", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "create_view_as", "macro_sql": "{% macro create_view_as(relation, sql) -%}\n {{ adapter.dispatch('create_view_as', 'dbt')(relation, sql) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4405043}, "macro.dbt.default__create_view_as": {"unique_id": "macro.dbt.default__create_view_as", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/create_view_as.sql", "original_file_path": "macros/materializations/models/view/create_view_as.sql", "name": "default__create_view_as", "macro_sql": "{% macro default__create_view_as(relation, sql) -%}\n {%- set sql_header = config.get('sql_header', none) -%}\n\n {{ sql_header if sql_header is not none }}\n create view {{ relation }} as (\n {{ sql }}\n );\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4410021}, "macro.dbt.handle_existing_table": {"unique_id": "macro.dbt.handle_existing_table", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "name": "handle_existing_table", "macro_sql": "{% macro handle_existing_table(full_refresh, old_relation) %}\n {{ adapter.dispatch('handle_existing_table', 'dbt')(full_refresh, old_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__handle_existing_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4418468}, "macro.dbt.default__handle_existing_table": {"unique_id": "macro.dbt.default__handle_existing_table", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/helpers.sql", "original_file_path": "macros/materializations/models/view/helpers.sql", "name": "default__handle_existing_table", "macro_sql": "{% macro default__handle_existing_table(full_refresh, old_relation) %}\n {{ log(\"Dropping relation \" ~ old_relation ~ \" because it is of type \" ~ old_relation.type) }}\n {{ adapter.drop_relation(old_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.442286}, "macro.dbt.materialization_view_default": {"unique_id": "macro.dbt.materialization_view_default", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/models/view/view.sql", "original_file_path": "macros/materializations/models/view/view.sql", "name": "materialization_view_default", "macro_sql": "{%- materialization view, default -%}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='view') -%}\n {%- set intermediate_relation = make_intermediate_relation(target_relation) -%}\n\n -- the intermediate_relation should not already exist in the database; get_relation\n -- will return None in that case. Otherwise, we get a relation that we can drop\n -- later, before we try to use this name for the current operation\n {%- set preexisting_intermediate_relation = load_cached_relation(intermediate_relation) -%}\n /*\n This relation (probably) doesn't exist yet. If it does exist, it's a leftover from\n a previous run, and we're going to try to drop it immediately. At the end of this\n materialization, we're going to rename the \"existing_relation\" to this identifier,\n and then we're going to drop it. In order to make sure we run the correct one of:\n - drop view ...\n - drop table ...\n\n We need to set the type of this relation to be the type of the existing_relation, if it exists,\n or else \"view\" as a sane default if it does not. Note that if the existing_relation does not\n exist, then there is nothing to move out of the way and subsequentally drop. In that case,\n this relation will be effectively unused.\n */\n {%- set backup_relation_type = 'view' if existing_relation is none else existing_relation.type -%}\n {%- set backup_relation = make_backup_relation(target_relation, backup_relation_type) -%}\n -- as above, the backup_relation should not already exist\n {%- set preexisting_backup_relation = load_cached_relation(backup_relation) -%}\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- drop the temp relations if they exist already in the database\n {{ drop_relation_if_exists(preexisting_intermediate_relation) }}\n {{ drop_relation_if_exists(preexisting_backup_relation) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_view_as_sql(intermediate_relation, sql) }}\n {%- endcall %}\n\n -- cleanup\n -- move the existing view out of the way\n {% if existing_relation is not none %}\n {{ adapter.rename_relation(existing_relation, backup_relation) }}\n {% endif %}\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {% set should_revoke = should_revoke(existing_relation, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {{ drop_relation_if_exists(backup_relation) }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.load_cached_relation", "macro.dbt.make_intermediate_relation", "macro.dbt.make_backup_relation", "macro.dbt.run_hooks", "macro.dbt.drop_relation_if_exists", "macro.dbt.statement", "macro.dbt.get_create_view_as_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.479165}, "macro.dbt.create_csv_table": {"unique_id": "macro.dbt.create_csv_table", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "create_csv_table", "macro_sql": "{% macro create_csv_table(model, agate_table) -%}\n {{ adapter.dispatch('create_csv_table', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.486575}, "macro.dbt.default__create_csv_table": {"unique_id": "macro.dbt.default__create_csv_table", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__create_csv_table", "macro_sql": "{% macro default__create_csv_table(model, agate_table) %}\n {%- set column_override = model['config'].get('column_types', {}) -%}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n\n {% set sql %}\n create table {{ this.render() }} (\n {%- for col_name in agate_table.column_names -%}\n {%- set inferred_type = adapter.convert_type(agate_table, loop.index0) -%}\n {%- set type = column_override.get(col_name, inferred_type) -%}\n {%- set column_name = (col_name | string) -%}\n {{ adapter.quote_seed_column(column_name, quote_seed_column) }} {{ type }} {%- if not loop.last -%}, {%- endif -%}\n {%- endfor -%}\n )\n {% endset %}\n\n {% call statement('_') -%}\n {{ sql }}\n {%- endcall %}\n\n {{ return(sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4883041}, "macro.dbt.reset_csv_table": {"unique_id": "macro.dbt.reset_csv_table", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "reset_csv_table", "macro_sql": "{% macro reset_csv_table(model, full_refresh, old_relation, agate_table) -%}\n {{ adapter.dispatch('reset_csv_table', 'dbt')(model, full_refresh, old_relation, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4887605}, "macro.dbt.default__reset_csv_table": {"unique_id": "macro.dbt.default__reset_csv_table", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__reset_csv_table", "macro_sql": "{% macro default__reset_csv_table(model, full_refresh, old_relation, agate_table) %}\n {% set sql = \"\" %}\n {% if full_refresh %}\n {{ adapter.drop_relation(old_relation) }}\n {% set sql = create_csv_table(model, agate_table) %}\n {% else %}\n {{ adapter.truncate_relation(old_relation) }}\n {% set sql = \"truncate table \" ~ old_relation %}\n {% endif %}\n\n {{ return(sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.489688}, "macro.dbt.get_csv_sql": {"unique_id": "macro.dbt.get_csv_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_csv_sql", "macro_sql": "{% macro get_csv_sql(create_or_truncate_sql, insert_sql) %}\n {{ adapter.dispatch('get_csv_sql', 'dbt')(create_or_truncate_sql, insert_sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_csv_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4900575}, "macro.dbt.default__get_csv_sql": {"unique_id": "macro.dbt.default__get_csv_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_csv_sql", "macro_sql": "{% macro default__get_csv_sql(create_or_truncate_sql, insert_sql) %}\n {{ create_or_truncate_sql }};\n -- dbt seed --\n {{ insert_sql }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4903355}, "macro.dbt.get_binding_char": {"unique_id": "macro.dbt.get_binding_char", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_binding_char", "macro_sql": "{% macro get_binding_char() -%}\n {{ adapter.dispatch('get_binding_char', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4906044}, "macro.dbt.default__get_binding_char": {"unique_id": "macro.dbt.default__get_binding_char", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_binding_char", "macro_sql": "{% macro default__get_binding_char() %}\n {{ return('%s') }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4908295}, "macro.dbt.get_batch_size": {"unique_id": "macro.dbt.get_batch_size", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_batch_size", "macro_sql": "{% macro get_batch_size() -%}\n {{ return(adapter.dispatch('get_batch_size', 'dbt')()) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__get_batch_size"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4911313}, "macro.dbt.default__get_batch_size": {"unique_id": "macro.dbt.default__get_batch_size", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__get_batch_size", "macro_sql": "{% macro default__get_batch_size() %}\n {{ return(10000) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4913704}, "macro.dbt.get_seed_column_quoted_csv": {"unique_id": "macro.dbt.get_seed_column_quoted_csv", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "get_seed_column_quoted_csv", "macro_sql": "{% macro get_seed_column_quoted_csv(model, column_names) %}\n {%- set quote_seed_column = model['config'].get('quote_columns', None) -%}\n {% set quoted = [] %}\n {% for col in column_names -%}\n {%- do quoted.append(adapter.quote_seed_column(col, quote_seed_column)) -%}\n {%- endfor %}\n\n {%- set dest_cols_csv = quoted | join(', ') -%}\n {{ return(dest_cols_csv) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4922884}, "macro.dbt.load_csv_rows": {"unique_id": "macro.dbt.load_csv_rows", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "load_csv_rows", "macro_sql": "{% macro load_csv_rows(model, agate_table) -%}\n {{ adapter.dispatch('load_csv_rows', 'dbt')(model, agate_table) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.492651}, "macro.dbt.default__load_csv_rows": {"unique_id": "macro.dbt.default__load_csv_rows", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "name": "default__load_csv_rows", "macro_sql": "{% macro default__load_csv_rows(model, agate_table) %}\n\n {% set batch_size = get_batch_size() %}\n\n {% set cols_sql = get_seed_column_quoted_csv(model, agate_table.column_names) %}\n {% set bindings = [] %}\n\n {% set statements = [] %}\n\n {% for chunk in agate_table.rows | batch(batch_size) %}\n {% set bindings = [] %}\n\n {% for row in chunk %}\n {% do bindings.extend(row) %}\n {% endfor %}\n\n {% set sql %}\n insert into {{ this.render() }} ({{ cols_sql }}) values\n {% for row in chunk -%}\n ({%- for column in agate_table.column_names -%}\n {{ get_binding_char() }}\n {%- if not loop.last%},{%- endif %}\n {%- endfor -%})\n {%- if not loop.last%},{%- endif %}\n {%- endfor %}\n {% endset %}\n\n {% do adapter.add_query(sql, bindings=bindings, abridge_sql_log=True) %}\n\n {% if loop.index0 == 0 %}\n {% do statements.append(sql) %}\n {% endif %}\n {% endfor %}\n\n {# Return SQL so we can render it out into the compiled files #}\n {{ return(statements[0]) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_batch_size", "macro.dbt.get_seed_column_quoted_csv", "macro.dbt.get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.4950507}, "macro.dbt.materialization_seed_default": {"unique_id": "macro.dbt.materialization_seed_default", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/seeds/seed.sql", "original_file_path": "macros/materializations/seeds/seed.sql", "name": "materialization_seed_default", "macro_sql": "{% materialization seed, default %}\n\n {%- set identifier = model['alias'] -%}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n\n {%- set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) -%}\n\n {%- set exists_as_table = (old_relation is not none and old_relation.is_table) -%}\n {%- set exists_as_view = (old_relation is not none and old_relation.is_view) -%}\n\n {%- set grant_config = config.get('grants') -%}\n {%- set agate_table = load_agate_table() -%}\n -- grab current tables grants config for comparision later on\n\n {%- do store_result('agate_table', response='OK', agate_table=agate_table) -%}\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n -- `BEGIN` happens here:\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n -- build model\n {% set create_table_sql = \"\" %}\n {% if exists_as_view %}\n {{ exceptions.raise_compiler_error(\"Cannot seed to '{}', it is a view\".format(old_relation)) }}\n {% elif exists_as_table %}\n {% set create_table_sql = reset_csv_table(model, full_refresh_mode, old_relation, agate_table) %}\n {% else %}\n {% set create_table_sql = create_csv_table(model, agate_table) %}\n {% endif %}\n\n {% set code = 'CREATE' if full_refresh_mode else 'INSERT' %}\n {% set rows_affected = (agate_table.rows | length) %}\n {% set sql = load_csv_rows(model, agate_table) %}\n\n {% call noop_statement('main', code ~ ' ' ~ rows_affected, code, rows_affected) %}\n {{ get_csv_sql(create_table_sql, sql) }};\n {% endcall %}\n\n {% set target_relation = this.incorporate(type='table') %}\n\n {% set should_revoke = should_revoke(old_relation, full_refresh_mode) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if full_refresh_mode or not exists_as_table %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n -- `COMMIT` happens here\n {{ adapter.commit() }}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.run_hooks", "macro.dbt.reset_csv_table", "macro.dbt.create_csv_table", "macro.dbt.load_csv_rows", "macro.dbt.noop_statement", "macro.dbt.get_csv_sql", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.501021}, "macro.dbt.create_columns": {"unique_id": "macro.dbt.create_columns", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "create_columns", "macro_sql": "{% macro create_columns(relation, columns) %}\n {{ adapter.dispatch('create_columns', 'dbt')(relation, columns) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__create_columns"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.507034}, "macro.dbt.default__create_columns": {"unique_id": "macro.dbt.default__create_columns", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__create_columns", "macro_sql": "{% macro default__create_columns(relation, columns) %}\n {% for column in columns %}\n {% call statement() %}\n alter table {{ relation }} add column \"{{ column.name }}\" {{ column.data_type }};\n {% endcall %}\n {% endfor %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5075982}, "macro.dbt.post_snapshot": {"unique_id": "macro.dbt.post_snapshot", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "post_snapshot", "macro_sql": "{% macro post_snapshot(staging_relation) %}\n {{ adapter.dispatch('post_snapshot', 'dbt')(staging_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5079234}, "macro.dbt.default__post_snapshot": {"unique_id": "macro.dbt.default__post_snapshot", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__post_snapshot", "macro_sql": "{% macro default__post_snapshot(staging_relation) %}\n {# no-op #}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5081}, "macro.dbt.get_true_sql": {"unique_id": "macro.dbt.get_true_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "get_true_sql", "macro_sql": "{% macro get_true_sql() %}\n {{ adapter.dispatch('get_true_sql', 'dbt')() }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_true_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5083992}, "macro.dbt.default__get_true_sql": {"unique_id": "macro.dbt.default__get_true_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__get_true_sql", "macro_sql": "{% macro default__get_true_sql() %}\n {{ return('TRUE') }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.50863}, "macro.dbt.snapshot_staging_table": {"unique_id": "macro.dbt.snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "snapshot_staging_table", "macro_sql": "{% macro snapshot_staging_table(strategy, source_sql, target_relation) -%}\n {{ adapter.dispatch('snapshot_staging_table', 'dbt')(strategy, source_sql, target_relation) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_staging_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5090153}, "macro.dbt.default__snapshot_staging_table": {"unique_id": "macro.dbt.default__snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__snapshot_staging_table", "macro_sql": "{% macro default__snapshot_staging_table(strategy, source_sql, target_relation) -%}\n\n with snapshot_query as (\n\n {{ source_sql }}\n\n ),\n\n snapshotted_data as (\n\n select *,\n {{ strategy.unique_key }} as dbt_unique_key\n\n from {{ target_relation }}\n where dbt_valid_to is null\n\n ),\n\n insertions_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to,\n {{ strategy.scd_id }} as dbt_scd_id\n\n from snapshot_query\n ),\n\n updates_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n {{ strategy.updated_at }} as dbt_valid_to\n\n from snapshot_query\n ),\n\n {%- if strategy.invalidate_hard_deletes %}\n\n deletes_source_data as (\n\n select\n *,\n {{ strategy.unique_key }} as dbt_unique_key\n from snapshot_query\n ),\n {% endif %}\n\n insertions as (\n\n select\n 'insert' as dbt_change_type,\n source_data.*\n\n from insertions_source_data as source_data\n left outer join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where snapshotted_data.dbt_unique_key is null\n or (\n snapshotted_data.dbt_unique_key is not null\n and (\n {{ strategy.row_changed }}\n )\n )\n\n ),\n\n updates as (\n\n select\n 'update' as dbt_change_type,\n source_data.*,\n snapshotted_data.dbt_scd_id\n\n from updates_source_data as source_data\n join snapshotted_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where (\n {{ strategy.row_changed }}\n )\n )\n\n {%- if strategy.invalidate_hard_deletes -%}\n ,\n\n deletes as (\n\n select\n 'delete' as dbt_change_type,\n source_data.*,\n {{ snapshot_get_time() }} as dbt_valid_from,\n {{ snapshot_get_time() }} as dbt_updated_at,\n {{ snapshot_get_time() }} as dbt_valid_to,\n snapshotted_data.dbt_scd_id\n\n from snapshotted_data\n left join deletes_source_data as source_data on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key\n where source_data.dbt_unique_key is null\n )\n {%- endif %}\n\n select * from insertions\n union all\n select * from updates\n {%- if strategy.invalidate_hard_deletes %}\n union all\n select * from deletes\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5106745}, "macro.dbt.build_snapshot_table": {"unique_id": "macro.dbt.build_snapshot_table", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "build_snapshot_table", "macro_sql": "{% macro build_snapshot_table(strategy, sql) -%}\n {{ adapter.dispatch('build_snapshot_table', 'dbt')(strategy, sql) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__build_snapshot_table"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5110424}, "macro.dbt.default__build_snapshot_table": {"unique_id": "macro.dbt.default__build_snapshot_table", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "default__build_snapshot_table", "macro_sql": "{% macro default__build_snapshot_table(strategy, sql) %}\n\n select *,\n {{ strategy.scd_id }} as dbt_scd_id,\n {{ strategy.updated_at }} as dbt_updated_at,\n {{ strategy.updated_at }} as dbt_valid_from,\n nullif({{ strategy.updated_at }}, {{ strategy.updated_at }}) as dbt_valid_to\n from (\n {{ sql }}\n ) sbq\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5115504}, "macro.dbt.build_snapshot_staging_table": {"unique_id": "macro.dbt.build_snapshot_staging_table", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/helpers.sql", "original_file_path": "macros/materializations/snapshots/helpers.sql", "name": "build_snapshot_staging_table", "macro_sql": "{% macro build_snapshot_staging_table(strategy, sql, target_relation) %}\n {% set temp_relation = make_temp_relation(target_relation) %}\n\n {% set select = snapshot_staging_table(strategy, sql, target_relation) %}\n\n {% call statement('build_snapshot_staging_relation') %}\n {{ create_table_as(True, temp_relation, select) }}\n {% endcall %}\n\n {% do return(temp_relation) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.make_temp_relation", "macro.dbt.snapshot_staging_table", "macro.dbt.statement", "macro.dbt.create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.512387}, "macro.dbt.materialization_snapshot_default": {"unique_id": "macro.dbt.materialization_snapshot_default", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot.sql", "original_file_path": "macros/materializations/snapshots/snapshot.sql", "name": "materialization_snapshot_default", "macro_sql": "{% materialization snapshot, default %}\n {%- set config = model['config'] -%}\n\n {%- set target_table = model.get('alias', model.get('name')) -%}\n\n {%- set strategy_name = config.get('strategy') -%}\n {%- set unique_key = config.get('unique_key') %}\n -- grab current tables grants config for comparision later on\n {%- set grant_config = config.get('grants') -%}\n\n {% set target_relation_exists, target_relation = get_or_create_relation(\n database=model.database,\n schema=model.schema,\n identifier=target_table,\n type='table') -%}\n\n {%- if not target_relation.is_table -%}\n {% do exceptions.relation_wrong_type(target_relation, 'table') %}\n {%- endif -%}\n\n\n {{ run_hooks(pre_hooks, inside_transaction=False) }}\n\n {{ run_hooks(pre_hooks, inside_transaction=True) }}\n\n {% set strategy_macro = strategy_dispatch(strategy_name) %}\n {% set strategy = strategy_macro(model, \"snapshotted_data\", \"source_data\", config, target_relation_exists) %}\n\n {% if not target_relation_exists %}\n\n {% set build_sql = build_snapshot_table(strategy, model['compiled_sql']) %}\n {% set final_sql = create_table_as(False, target_relation, build_sql) %}\n\n {% else %}\n\n {{ adapter.valid_snapshot_target(target_relation) }}\n\n {% set staging_table = build_snapshot_staging_table(strategy, sql, target_relation) %}\n\n -- this may no-op if the database does not require column expansion\n {% do adapter.expand_target_column_types(from_relation=staging_table,\n to_relation=target_relation) %}\n\n {% set missing_columns = adapter.get_missing_columns(staging_table, target_relation)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\n | list %}\n\n {% do create_columns(target_relation, missing_columns) %}\n\n {% set source_columns = adapter.get_columns_in_relation(staging_table)\n | rejectattr('name', 'equalto', 'dbt_change_type')\n | rejectattr('name', 'equalto', 'DBT_CHANGE_TYPE')\n | rejectattr('name', 'equalto', 'dbt_unique_key')\n | rejectattr('name', 'equalto', 'DBT_UNIQUE_KEY')\n | list %}\n\n {% set quoted_source_columns = [] %}\n {% for column in source_columns %}\n {% do quoted_source_columns.append(adapter.quote(column.name)) %}\n {% endfor %}\n\n {% set final_sql = snapshot_merge_sql(\n target = target_relation,\n source = staging_table,\n insert_cols = quoted_source_columns\n )\n %}\n\n {% endif %}\n\n {% call statement('main') %}\n {{ final_sql }}\n {% endcall %}\n\n {% set should_revoke = should_revoke(target_relation_exists, full_refresh_mode=False) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=should_revoke) %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% if not target_relation_exists %}\n {% do create_indexes(target_relation) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=True) }}\n\n {{ adapter.commit() }}\n\n {% if staging_table is defined %}\n {% do post_snapshot(staging_table) %}\n {% endif %}\n\n {{ run_hooks(post_hooks, inside_transaction=False) }}\n\n {{ return({'relations': [target_relation]}) }}\n\n{% endmaterialization %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_or_create_relation", "macro.dbt.run_hooks", "macro.dbt.strategy_dispatch", "macro.dbt.build_snapshot_table", "macro.dbt.create_table_as", "macro.dbt.build_snapshot_staging_table", "macro.dbt.create_columns", "macro.dbt.snapshot_merge_sql", "macro.dbt.statement", "macro.dbt.should_revoke", "macro.dbt.apply_grants", "macro.dbt.persist_docs", "macro.dbt.create_indexes", "macro.dbt.post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.522677}, "macro.dbt.snapshot_merge_sql": {"unique_id": "macro.dbt.snapshot_merge_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "name": "snapshot_merge_sql", "macro_sql": "{% macro snapshot_merge_sql(target, source, insert_cols) -%}\n {{ adapter.dispatch('snapshot_merge_sql', 'dbt')(target, source, insert_cols) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5237744}, "macro.dbt.default__snapshot_merge_sql": {"unique_id": "macro.dbt.default__snapshot_merge_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "name": "default__snapshot_merge_sql", "macro_sql": "{% macro default__snapshot_merge_sql(target, source, insert_cols) -%}\n {%- set insert_cols_csv = insert_cols | join(', ') -%}\n\n merge into {{ target }} as DBT_INTERNAL_DEST\n using {{ source }} as DBT_INTERNAL_SOURCE\n on DBT_INTERNAL_SOURCE.dbt_scd_id = DBT_INTERNAL_DEST.dbt_scd_id\n\n when matched\n and DBT_INTERNAL_DEST.dbt_valid_to is null\n and DBT_INTERNAL_SOURCE.dbt_change_type in ('update', 'delete')\n then update\n set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to\n\n when not matched\n and DBT_INTERNAL_SOURCE.dbt_change_type = 'insert'\n then insert ({{ insert_cols_csv }})\n values ({{ insert_cols_csv }})\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.524333}, "macro.dbt.strategy_dispatch": {"unique_id": "macro.dbt.strategy_dispatch", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "strategy_dispatch", "macro_sql": "{% macro strategy_dispatch(name) -%}\n{% set original_name = name %}\n {% if '.' in name %}\n {% set package_name, name = name.split(\".\", 1) %}\n {% else %}\n {% set package_name = none %}\n {% endif %}\n\n {% if package_name is none %}\n {% set package_context = context %}\n {% elif package_name in context %}\n {% set package_context = context[package_name] %}\n {% else %}\n {% set error_msg %}\n Could not find package '{{package_name}}', called with '{{original_name}}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n\n {%- set search_name = 'snapshot_' ~ name ~ '_strategy' -%}\n\n {% if search_name not in package_context %}\n {% set error_msg %}\n The specified strategy macro '{{name}}' was not found in package '{{ package_name }}'\n {% endset %}\n {{ exceptions.raise_compiler_error(error_msg | trim) }}\n {% endif %}\n {{ return(package_context[search_name]) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5303009}, "macro.dbt.snapshot_hash_arguments": {"unique_id": "macro.dbt.snapshot_hash_arguments", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_hash_arguments", "macro_sql": "{% macro snapshot_hash_arguments(args) -%}\n {{ adapter.dispatch('snapshot_hash_arguments', 'dbt')(args) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5306342}, "macro.dbt.default__snapshot_hash_arguments": {"unique_id": "macro.dbt.default__snapshot_hash_arguments", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "default__snapshot_hash_arguments", "macro_sql": "{% macro default__snapshot_hash_arguments(args) -%}\n md5({%- for arg in args -%}\n coalesce(cast({{ arg }} as varchar ), '')\n {% if not loop.last %} || '|' || {% endif %}\n {%- endfor -%})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5310838}, "macro.dbt.snapshot_get_time": {"unique_id": "macro.dbt.snapshot_get_time", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_get_time", "macro_sql": "{% macro snapshot_get_time() -%}\n {{ adapter.dispatch('snapshot_get_time', 'dbt')() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5313885}, "macro.dbt.default__snapshot_get_time": {"unique_id": "macro.dbt.default__snapshot_get_time", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "default__snapshot_get_time", "macro_sql": "{% macro default__snapshot_get_time() -%}\n {{ current_timestamp() }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5315866}, "macro.dbt.snapshot_timestamp_strategy": {"unique_id": "macro.dbt.snapshot_timestamp_strategy", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_timestamp_strategy", "macro_sql": "{% macro snapshot_timestamp_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set primary_key = config['unique_key'] %}\n {% set updated_at = config['updated_at'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n\n {#/*\n The snapshot relation might not have an {{ updated_at }} value if the\n snapshot strategy is changed from `check` to `timestamp`. We\n should use a dbt-created column for the comparison in the snapshot\n table instead of assuming that the user-supplied {{ updated_at }}\n will be present in the historical data.\n\n See https://github.com/dbt-labs/dbt-core/issues/2350\n */ #}\n {% set row_changed_expr -%}\n ({{ snapshotted_rel }}.dbt_valid_from < {{ current_rel }}.{{ updated_at }})\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes\n }) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5336797}, "macro.dbt.snapshot_string_as_time": {"unique_id": "macro.dbt.snapshot_string_as_time", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_string_as_time", "macro_sql": "{% macro snapshot_string_as_time(timestamp) -%}\n {{ adapter.dispatch('snapshot_string_as_time', 'dbt')(timestamp) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.534203}, "macro.dbt.default__snapshot_string_as_time": {"unique_id": "macro.dbt.default__snapshot_string_as_time", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "default__snapshot_string_as_time", "macro_sql": "{% macro default__snapshot_string_as_time(timestamp) %}\n {% do exceptions.raise_not_implemented(\n 'snapshot_string_as_time macro not implemented for adapter '+adapter.type()\n ) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5348194}, "macro.dbt.snapshot_check_all_get_existing_columns": {"unique_id": "macro.dbt.snapshot_check_all_get_existing_columns", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_check_all_get_existing_columns", "macro_sql": "{% macro snapshot_check_all_get_existing_columns(node, target_exists, check_cols_config) -%}\n {%- if not target_exists -%}\n {#-- no table yet -> return whatever the query does --#}\n {{ return((false, query_columns)) }}\n {%- endif -%}\n\n {#-- handle any schema changes --#}\n {%- set target_relation = adapter.get_relation(database=node.database, schema=node.schema, identifier=node.alias) -%}\n\n {% if check_cols_config == 'all' %}\n {%- set query_columns = get_columns_in_query(node['compiled_sql']) -%}\n\n {% elif check_cols_config is iterable and (check_cols_config | length) > 0 %}\n {#-- query for proper casing/quoting, to support comparison below --#}\n {%- set select_check_cols_from_target -%}\n select {{ check_cols_config | join(', ') }} from ({{ node['compiled_sql'] }}) subq\n {%- endset -%}\n {% set query_columns = get_columns_in_query(select_check_cols_from_target) %}\n\n {% else %}\n {% do exceptions.raise_compiler_error(\"Invalid value for 'check_cols': \" ~ check_cols_config) %}\n {% endif %}\n\n {%- set existing_cols = adapter.get_columns_in_relation(target_relation) | map(attribute = 'name') | list -%}\n {%- set ns = namespace() -%} {#-- handle for-loop scoping with a namespace --#}\n {%- set ns.column_added = false -%}\n\n {%- set intersection = [] -%}\n {%- for col in query_columns -%}\n {%- if col in existing_cols -%}\n {%- do intersection.append(adapter.quote(col)) -%}\n {%- else -%}\n {% set ns.column_added = true %}\n {%- endif -%}\n {%- endfor -%}\n {{ return((ns.column_added, intersection)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.get_columns_in_query"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5386357}, "macro.dbt.snapshot_check_strategy": {"unique_id": "macro.dbt.snapshot_check_strategy", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/snapshots/strategies.sql", "original_file_path": "macros/materializations/snapshots/strategies.sql", "name": "snapshot_check_strategy", "macro_sql": "{% macro snapshot_check_strategy(node, snapshotted_rel, current_rel, config, target_exists) %}\n {% set check_cols_config = config['check_cols'] %}\n {% set primary_key = config['unique_key'] %}\n {% set invalidate_hard_deletes = config.get('invalidate_hard_deletes', false) %}\n {% set updated_at = config.get('updated_at', snapshot_get_time()) %}\n\n {% set column_added = false %}\n\n {% set column_added, check_cols = snapshot_check_all_get_existing_columns(node, target_exists, check_cols_config) %}\n\n {%- set row_changed_expr -%}\n (\n {%- if column_added -%}\n {{ get_true_sql() }}\n {%- else -%}\n {%- for col in check_cols -%}\n {{ snapshotted_rel }}.{{ col }} != {{ current_rel }}.{{ col }}\n or\n (\n (({{ snapshotted_rel }}.{{ col }} is null) and not ({{ current_rel }}.{{ col }} is null))\n or\n ((not {{ snapshotted_rel }}.{{ col }} is null) and ({{ current_rel }}.{{ col }} is null))\n )\n {%- if not loop.last %} or {% endif -%}\n {%- endfor -%}\n {%- endif -%}\n )\n {%- endset %}\n\n {% set scd_id_expr = snapshot_hash_arguments([primary_key, updated_at]) %}\n\n {% do return({\n \"unique_key\": primary_key,\n \"updated_at\": updated_at,\n \"row_changed\": row_changed_expr,\n \"scd_id\": scd_id_expr,\n \"invalidate_hard_deletes\": invalidate_hard_deletes\n }) %}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.snapshot_get_time", "macro.dbt.snapshot_check_all_get_existing_columns", "macro.dbt.get_true_sql", "macro.dbt.snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5415173}, "macro.dbt.get_test_sql": {"unique_id": "macro.dbt.get_test_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "name": "get_test_sql", "macro_sql": "{% macro get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n {{ adapter.dispatch('get_test_sql', 'dbt')(main_sql, fail_calc, warn_if, error_if, limit) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5427551}, "macro.dbt.default__get_test_sql": {"unique_id": "macro.dbt.default__get_test_sql", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "name": "default__get_test_sql", "macro_sql": "{% macro default__get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n select\n {{ fail_calc }} as failures,\n {{ fail_calc }} {{ warn_if }} as should_warn,\n {{ fail_calc }} {{ error_if }} as should_error\n from (\n {{ main_sql }}\n {{ \"limit \" ~ limit if limit != none }}\n ) dbt_internal_test\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.543465}, "macro.dbt.materialization_test_default": {"unique_id": "macro.dbt.materialization_test_default", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/test.sql", "original_file_path": "macros/materializations/tests/test.sql", "name": "materialization_test_default", "macro_sql": "{%- materialization test, default -%}\n\n {% set relations = [] %}\n\n {% if should_store_failures() %}\n\n {% set identifier = model['alias'] %}\n {% set old_relation = adapter.get_relation(database=database, schema=schema, identifier=identifier) %}\n {% set target_relation = api.Relation.create(\n identifier=identifier, schema=schema, database=database, type='table') -%} %}\n\n {% if old_relation %}\n {% do adapter.drop_relation(old_relation) %}\n {% endif %}\n\n {% call statement(auto_begin=True) %}\n {{ create_table_as(False, target_relation, sql) }}\n {% endcall %}\n\n {% do relations.append(target_relation) %}\n\n {% set main_sql %}\n select *\n from {{ target_relation }}\n {% endset %}\n\n {{ adapter.commit() }}\n\n {% else %}\n\n {% set main_sql = sql %}\n\n {% endif %}\n\n {% set limit = config.get('limit') %}\n {% set fail_calc = config.get('fail_calc') %}\n {% set warn_if = config.get('warn_if') %}\n {% set error_if = config.get('error_if') %}\n\n {% call statement('main', fetch_result=True) -%}\n\n {{ get_test_sql(main_sql, fail_calc, warn_if, error_if, limit)}}\n\n {%- endcall %}\n\n {{ return({'relations': relations}) }}\n\n{%- endmaterialization -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.should_store_failures", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt.get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5480745}, "macro.dbt.get_where_subquery": {"unique_id": "macro.dbt.get_where_subquery", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "name": "get_where_subquery", "macro_sql": "{% macro get_where_subquery(relation) -%}\n {% do return(adapter.dispatch('get_where_subquery', 'dbt')(relation)) %}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__get_where_subquery"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5491748}, "macro.dbt.default__get_where_subquery": {"unique_id": "macro.dbt.default__get_where_subquery", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "name": "default__get_where_subquery", "macro_sql": "{% macro default__get_where_subquery(relation) -%}\n {% set where = config.get('where', '') %}\n {% if where %}\n {%- set filtered -%}\n (select * from {{ relation }} where {{ where }}) dbt_subquery\n {%- endset -%}\n {% do return(filtered) %}\n {%- else -%}\n {% do return(relation) %}\n {%- endif -%}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.550018}, "macro.dbt.any_value": {"unique_id": "macro.dbt.any_value", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "name": "any_value", "macro_sql": "{% macro any_value(expression) -%}\n {{ return(adapter.dispatch('any_value', 'dbt') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__any_value"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5509105}, "macro.dbt.default__any_value": {"unique_id": "macro.dbt.default__any_value", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "name": "default__any_value", "macro_sql": "{% macro default__any_value(expression) -%}\n\n any_value({{ expression }})\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5511577}, "macro.dbt.bool_or": {"unique_id": "macro.dbt.bool_or", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "name": "bool_or", "macro_sql": "{% macro bool_or(expression) -%}\n {{ return(adapter.dispatch('bool_or', 'dbt') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.552036}, "macro.dbt.default__bool_or": {"unique_id": "macro.dbt.default__bool_or", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "name": "default__bool_or", "macro_sql": "{% macro default__bool_or(expression) -%}\n\n bool_or({{ expression }})\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.552291}, "macro.dbt.cast_bool_to_text": {"unique_id": "macro.dbt.cast_bool_to_text", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "name": "cast_bool_to_text", "macro_sql": "{% macro cast_bool_to_text(field) %}\n {{ adapter.dispatch('cast_bool_to_text', 'dbt') (field) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__cast_bool_to_text"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.553126}, "macro.dbt.default__cast_bool_to_text": {"unique_id": "macro.dbt.default__cast_bool_to_text", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/cast_bool_to_text.sql", "original_file_path": "macros/utils/cast_bool_to_text.sql", "name": "default__cast_bool_to_text", "macro_sql": "{% macro default__cast_bool_to_text(field) %}\n cast({{ field }} as {{ api.Column.translate_type('string') }})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5535073}, "macro.dbt.concat": {"unique_id": "macro.dbt.concat", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "name": "concat", "macro_sql": "{% macro concat(fields) -%}\n {{ return(adapter.dispatch('concat', 'dbt')(fields)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__concat"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.576424}, "macro.dbt.default__concat": {"unique_id": "macro.dbt.default__concat", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/concat.sql", "original_file_path": "macros/utils/concat.sql", "name": "default__concat", "macro_sql": "{% macro default__concat(fields) -%}\n {{ fields|join(' || ') }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5766897}, "macro.dbt.type_string": {"unique_id": "macro.dbt.type_string", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_string", "macro_sql": "\n\n{%- macro type_string() -%}\n {{ return(adapter.dispatch('type_string', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__type_string"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.578438}, "macro.dbt.default__type_string": {"unique_id": "macro.dbt.default__type_string", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_string", "macro_sql": "{% macro default__type_string() %}\n {{ return(api.Column.translate_type(\"string\")) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5787427}, "macro.dbt.type_timestamp": {"unique_id": "macro.dbt.type_timestamp", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_timestamp", "macro_sql": "\n\n{%- macro type_timestamp() -%}\n {{ return(adapter.dispatch('type_timestamp', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5790613}, "macro.dbt.default__type_timestamp": {"unique_id": "macro.dbt.default__type_timestamp", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_timestamp", "macro_sql": "{% macro default__type_timestamp() %}\n {{ return(api.Column.translate_type(\"timestamp\")) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5793753}, "macro.dbt.type_float": {"unique_id": "macro.dbt.type_float", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_float", "macro_sql": "\n\n{%- macro type_float() -%}\n {{ return(adapter.dispatch('type_float', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__type_float"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5796945}, "macro.dbt.default__type_float": {"unique_id": "macro.dbt.default__type_float", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_float", "macro_sql": "{% macro default__type_float() %}\n {{ return(api.Column.translate_type(\"float\")) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5799892}, "macro.dbt.type_numeric": {"unique_id": "macro.dbt.type_numeric", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_numeric", "macro_sql": "\n\n{%- macro type_numeric() -%}\n {{ return(adapter.dispatch('type_numeric', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5803246}, "macro.dbt.default__type_numeric": {"unique_id": "macro.dbt.default__type_numeric", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_numeric", "macro_sql": "{% macro default__type_numeric() %}\n {{ return(api.Column.numeric_type(\"numeric\", 28, 6)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5807796}, "macro.dbt.type_bigint": {"unique_id": "macro.dbt.type_bigint", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_bigint", "macro_sql": "\n\n{%- macro type_bigint() -%}\n {{ return(adapter.dispatch('type_bigint', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__type_bigint"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5810926}, "macro.dbt.default__type_bigint": {"unique_id": "macro.dbt.default__type_bigint", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_bigint", "macro_sql": "{% macro default__type_bigint() %}\n {{ return(api.Column.translate_type(\"bigint\")) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5814013}, "macro.dbt.type_int": {"unique_id": "macro.dbt.type_int", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "type_int", "macro_sql": "\n\n{%- macro type_int() -%}\n {{ return(adapter.dispatch('type_int', 'dbt')()) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__type_int"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5817084}, "macro.dbt.default__type_int": {"unique_id": "macro.dbt.default__type_int", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/data_types.sql", "original_file_path": "macros/utils/data_types.sql", "name": "default__type_int", "macro_sql": "{%- macro default__type_int() -%}\n {{ return(api.Column.translate_type(\"integer\")) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.581986}, "macro.dbt.date_trunc": {"unique_id": "macro.dbt.date_trunc", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "name": "date_trunc", "macro_sql": "{% macro date_trunc(datepart, date) -%}\n {{ return(adapter.dispatch('date_trunc', 'dbt') (datepart, date)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5828378}, "macro.dbt.default__date_trunc": {"unique_id": "macro.dbt.default__date_trunc", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "name": "default__date_trunc", "macro_sql": "{% macro default__date_trunc(datepart, date) -%}\n date_trunc('{{datepart}}', {{date}})\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5831044}, "macro.dbt.dateadd": {"unique_id": "macro.dbt.dateadd", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "name": "dateadd", "macro_sql": "{% macro dateadd(datepart, interval, from_date_or_timestamp) %}\n {{ return(adapter.dispatch('dateadd', 'dbt')(datepart, interval, from_date_or_timestamp)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5840948}, "macro.dbt.default__dateadd": {"unique_id": "macro.dbt.default__dateadd", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "name": "default__dateadd", "macro_sql": "{% macro default__dateadd(datepart, interval, from_date_or_timestamp) %}\n\n dateadd(\n {{ datepart }},\n {{ interval }},\n {{ from_date_or_timestamp }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5844557}, "macro.dbt.datediff": {"unique_id": "macro.dbt.datediff", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "name": "datediff", "macro_sql": "{% macro datediff(first_date, second_date, datepart) %}\n {{ return(adapter.dispatch('datediff', 'dbt')(first_date, second_date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__datediff"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5853703}, "macro.dbt.default__datediff": {"unique_id": "macro.dbt.default__datediff", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "name": "default__datediff", "macro_sql": "{% macro default__datediff(first_date, second_date, datepart) -%}\n\n datediff(\n {{ datepart }},\n {{ first_date }},\n {{ second_date }}\n )\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5856972}, "macro.dbt.escape_single_quotes": {"unique_id": "macro.dbt.escape_single_quotes", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "name": "escape_single_quotes", "macro_sql": "{% macro escape_single_quotes(expression) %}\n {{ return(adapter.dispatch('escape_single_quotes', 'dbt') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__escape_single_quotes"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.586485}, "macro.dbt.default__escape_single_quotes": {"unique_id": "macro.dbt.default__escape_single_quotes", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/escape_single_quotes.sql", "original_file_path": "macros/utils/escape_single_quotes.sql", "name": "default__escape_single_quotes", "macro_sql": "{% macro default__escape_single_quotes(expression) -%}\n{{ expression | replace(\"'\",\"''\") }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5867605}, "macro.dbt.except": {"unique_id": "macro.dbt.except", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "name": "except", "macro_sql": "{% macro except() %}\n {{ return(adapter.dispatch('except', 'dbt')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__except"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5875065}, "macro.dbt.default__except": {"unique_id": "macro.dbt.default__except", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/except.sql", "original_file_path": "macros/utils/except.sql", "name": "default__except", "macro_sql": "{% macro default__except() %}\n\n except\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5876765}, "macro.dbt.hash": {"unique_id": "macro.dbt.hash", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "name": "hash", "macro_sql": "{% macro hash(field) -%}\n {{ return(adapter.dispatch('hash', 'dbt') (field)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__hash"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5884635}, "macro.dbt.default__hash": {"unique_id": "macro.dbt.default__hash", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "name": "default__hash", "macro_sql": "{% macro default__hash(field) -%}\n md5(cast({{ field }} as {{ api.Column.translate_type('string') }}))\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5887904}, "macro.dbt.intersect": {"unique_id": "macro.dbt.intersect", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "name": "intersect", "macro_sql": "{% macro intersect() %}\n {{ return(adapter.dispatch('intersect', 'dbt')()) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__intersect"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.589518}, "macro.dbt.default__intersect": {"unique_id": "macro.dbt.default__intersect", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/intersect.sql", "original_file_path": "macros/utils/intersect.sql", "name": "default__intersect", "macro_sql": "{% macro default__intersect() %}\n\n intersect\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5896842}, "macro.dbt.last_day": {"unique_id": "macro.dbt.last_day", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "name": "last_day", "macro_sql": "{% macro last_day(date, datepart) %}\n {{ return(adapter.dispatch('last_day', 'dbt') (date, datepart)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5906034}, "macro.dbt.default_last_day": {"unique_id": "macro.dbt.default_last_day", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "name": "default_last_day", "macro_sql": "\n\n{%- macro default_last_day(date, datepart) -%}\n cast(\n {{dbt.dateadd('day', '-1',\n dbt.dateadd(datepart, '1', dbt.date_trunc(datepart, date))\n )}}\n as date)\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.dateadd", "macro.dbt.date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.591167}, "macro.dbt.default__last_day": {"unique_id": "macro.dbt.default__last_day", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/last_day.sql", "original_file_path": "macros/utils/last_day.sql", "name": "default__last_day", "macro_sql": "{% macro default__last_day(date, datepart) -%}\n {{dbt.default_last_day(date, datepart)}}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default_last_day"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5914848}, "macro.dbt.length": {"unique_id": "macro.dbt.length", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "name": "length", "macro_sql": "{% macro length(expression) -%}\n {{ return(adapter.dispatch('length', 'dbt') (expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__length"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5922751}, "macro.dbt.default__length": {"unique_id": "macro.dbt.default__length", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/length.sql", "original_file_path": "macros/utils/length.sql", "name": "default__length", "macro_sql": "{% macro default__length(expression) %}\n\n length(\n {{ expression }}\n )\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.592507}, "macro.dbt.listagg": {"unique_id": "macro.dbt.listagg", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "name": "listagg", "macro_sql": "{% macro listagg(measure, delimiter_text=\"','\", order_by_clause=none, limit_num=none) -%}\n {{ return(adapter.dispatch('listagg', 'dbt') (measure, delimiter_text, order_by_clause, limit_num)) }}\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__listagg"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.593968}, "macro.dbt.default__listagg": {"unique_id": "macro.dbt.default__listagg", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "name": "default__listagg", "macro_sql": "{% macro default__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n\n {% if limit_num -%}\n array_to_string(\n array_slice(\n array_agg(\n {{ measure }}\n ){% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n ,0\n ,{{ limit_num }}\n ),\n {{ delimiter_text }}\n )\n {%- else %}\n listagg(\n {{ measure }},\n {{ delimiter_text }}\n )\n {% if order_by_clause -%}\n within group ({{ order_by_clause }})\n {%- endif %}\n {%- endif %}\n\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5947638}, "macro.dbt.string_literal": {"unique_id": "macro.dbt.string_literal", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "name": "string_literal", "macro_sql": "{%- macro string_literal(value) -%}\n {{ return(adapter.dispatch('string_literal', 'dbt') (value)) }}\n{%- endmacro -%}\n\n", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__string_literal"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5955167}, "macro.dbt.default__string_literal": {"unique_id": "macro.dbt.default__string_literal", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/literal.sql", "original_file_path": "macros/utils/literal.sql", "name": "default__string_literal", "macro_sql": "{% macro default__string_literal(value) -%}\n '{{ value }}'\n{%- endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5957284}, "macro.dbt.position": {"unique_id": "macro.dbt.position", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "name": "position", "macro_sql": "{% macro position(substring_text, string_text) -%}\n {{ return(adapter.dispatch('position', 'dbt') (substring_text, string_text)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__position"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5965679}, "macro.dbt.default__position": {"unique_id": "macro.dbt.default__position", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/position.sql", "original_file_path": "macros/utils/position.sql", "name": "default__position", "macro_sql": "{% macro default__position(substring_text, string_text) %}\n\n position(\n {{ substring_text }} in {{ string_text }}\n )\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5968418}, "macro.dbt.replace": {"unique_id": "macro.dbt.replace", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "name": "replace", "macro_sql": "{% macro replace(field, old_chars, new_chars) -%}\n {{ return(adapter.dispatch('replace', 'dbt') (field, old_chars, new_chars)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__replace"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.597735}, "macro.dbt.default__replace": {"unique_id": "macro.dbt.default__replace", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/replace.sql", "original_file_path": "macros/utils/replace.sql", "name": "default__replace", "macro_sql": "{% macro default__replace(field, old_chars, new_chars) %}\n\n replace(\n {{ field }},\n {{ old_chars }},\n {{ new_chars }}\n )\n\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.598059}, "macro.dbt.right": {"unique_id": "macro.dbt.right", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "name": "right", "macro_sql": "{% macro right(string_text, length_expression) -%}\n {{ return(adapter.dispatch('right', 'dbt') (string_text, length_expression)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__right"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5988972}, "macro.dbt.default__right": {"unique_id": "macro.dbt.default__right", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "name": "default__right", "macro_sql": "{% macro default__right(string_text, length_expression) %}\n\n right(\n {{ string_text }},\n {{ length_expression }}\n )\n\n{%- endmacro -%}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.5991716}, "macro.dbt.safe_cast": {"unique_id": "macro.dbt.safe_cast", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "name": "safe_cast", "macro_sql": "{% macro safe_cast(field, type) %}\n {{ return(adapter.dispatch('safe_cast', 'dbt') (field, type)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt_trino.trino__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.6000063}, "macro.dbt.default__safe_cast": {"unique_id": "macro.dbt.default__safe_cast", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "name": "default__safe_cast", "macro_sql": "{% macro default__safe_cast(field, type) %}\n {# most databases don't support this function yet\n so we just need to use cast #}\n cast({{field}} as {{type}})\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.6003122}, "macro.dbt.split_part": {"unique_id": "macro.dbt.split_part", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "name": "split_part", "macro_sql": "{% macro split_part(string_text, delimiter_text, part_number) %}\n {{ return(adapter.dispatch('split_part', 'dbt') (string_text, delimiter_text, part_number)) }}\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__split_part"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.6014748}, "macro.dbt.default__split_part": {"unique_id": "macro.dbt.default__split_part", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "name": "default__split_part", "macro_sql": "{% macro default__split_part(string_text, delimiter_text, part_number) %}\n\n split_part(\n {{ string_text }},\n {{ delimiter_text }},\n {{ part_number }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.601805}, "macro.dbt._split_part_negative": {"unique_id": "macro.dbt._split_part_negative", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "name": "_split_part_negative", "macro_sql": "{% macro _split_part_negative(string_text, delimiter_text, part_number) %}\n\n split_part(\n {{ string_text }},\n {{ delimiter_text }},\n length({{ string_text }})\n - length(\n replace({{ string_text }}, {{ delimiter_text }}, '')\n ) + 2 {{ part_number }}\n )\n\n{% endmacro %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.6022463}, "macro.dbt.test_unique": {"unique_id": "macro.dbt.test_unique", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_unique", "macro_sql": "{% test unique(model, column_name) %}\n {% set macro = adapter.dispatch('test_unique', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_unique"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.6034489}, "macro.dbt.test_not_null": {"unique_id": "macro.dbt.test_not_null", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_not_null", "macro_sql": "{% test not_null(model, column_name) %}\n {% set macro = adapter.dispatch('test_not_null', 'dbt') %}\n {{ macro(model, column_name) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_not_null"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.6038995}, "macro.dbt.test_accepted_values": {"unique_id": "macro.dbt.test_accepted_values", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_accepted_values", "macro_sql": "{% test accepted_values(model, column_name, values, quote=True) %}\n {% set macro = adapter.dispatch('test_accepted_values', 'dbt') %}\n {{ macro(model, column_name, values, quote) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_accepted_values"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.6044571}, "macro.dbt.test_relationships": {"unique_id": "macro.dbt.test_relationships", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "tests/generic/builtin.sql", "original_file_path": "tests/generic/builtin.sql", "name": "test_relationships", "macro_sql": "{% test relationships(model, column_name, to, field) %}\n {% set macro = adapter.dispatch('test_relationships', 'dbt') %}\n {{ macro(model, column_name, to, field) }}\n{% endtest %}", "resource_type": "macro", "tags": [], "depends_on": {"macros": ["macro.dbt.default__test_relationships"]}, "description": "", "meta": {}, "docs": {"show": true}, "patch_path": null, "arguments": [], "created_at": 1664696995.6049767}}, "docs": {"dbt.__overview__": {"unique_id": "dbt.__overview__", "package_name": "dbt", "root_path": "/opt/app-root/lib64/python3.8/site-packages/dbt/include/global_project", "path": "overview.md", "original_file_path": "docs/overview.md", "name": "__overview__", "block_contents": "### Welcome!\n\nWelcome to the auto-generated documentation for your dbt project!\n\n### Navigation\n\nYou can use the `Project` and `Database` navigation tabs on the left side of the window to explore the models\nin your project.\n\n#### Project Tab\nThe `Project` tab mirrors the directory structure of your dbt project. In this tab, you can see all of the\nmodels defined in your dbt project, as well as models imported from dbt packages.\n\n#### Database Tab\nThe `Database` tab also exposes your models, but in a format that looks more like a database explorer. This view\nshows relations (tables and views) grouped into database schemas. Note that ephemeral models are _not_ shown\nin this interface, as they do not exist in the database.\n\n### Graph Exploration\nYou can click the blue icon on the bottom-right corner of the page to view the lineage graph of your models.\n\nOn model pages, you'll see the immediate parents and children of the model you're exploring. By clicking the `Expand`\nbutton at the top-right of this lineage pane, you'll be able to see all of the models that are used to build,\nor are built from, the model you're exploring.\n\nOnce expanded, you'll be able to use the `--select` and `--exclude` model selection syntax to filter the\nmodels in the graph. For more information on model selection, check out the [dbt docs](https://docs.getdbt.com/docs/model-selection-syntax).\n\nNote that you can also right-click on models to interactively filter and explore the graph.\n\n---\n\n### More information\n\n- [What is dbt](https://docs.getdbt.com/docs/introduction)?\n- Read the [dbt viewpoint](https://docs.getdbt.com/docs/viewpoint)\n- [Installation](https://docs.getdbt.com/docs/installation)\n- Join the [dbt Community](https://www.getdbt.com/community/) for questions and discussion"}}, "exposures": {}, "metrics": {}, "selectors": {}, "disabled": {}, "parent_map": {"model.wri_gppd_transform.gppd_power_plants_list": [], "test.wri_gppd_transform.unique_gppd_power_plants_list_gppd_idnr.85ac978899": ["model.wri_gppd_transform.gppd_power_plants_list"], "test.wri_gppd_transform.not_null_gppd_power_plants_list_gppd_idnr.bb278f73bc": ["model.wri_gppd_transform.gppd_power_plants_list"], "test.wri_gppd_transform.unique_gppd_power_plants_list_name.37c2d0f477": ["model.wri_gppd_transform.gppd_power_plants_list"], "test.wri_gppd_transform.not_null_gppd_power_plants_list_name.a415d9e2a5": ["model.wri_gppd_transform.gppd_power_plants_list"], "test.wri_gppd_transform.not_null_gppd_power_plants_list_country.0d2e3aed2c": ["model.wri_gppd_transform.gppd_power_plants_list"], "test.wri_gppd_transform.not_null_gppd_power_plants_list_country_long.d394df506e": ["model.wri_gppd_transform.gppd_power_plants_list"], "test.wri_gppd_transform.not_null_gppd_power_plants_list_latitude.5cadb5eb49": ["model.wri_gppd_transform.gppd_power_plants_list"], "test.wri_gppd_transform.not_null_gppd_power_plants_list_longitude.b9a294aa23": ["model.wri_gppd_transform.gppd_power_plants_list"], "test.wri_gppd_transform.not_null_gppd_power_plants_list_capacity_mw.9f7ae55ef0": ["model.wri_gppd_transform.gppd_power_plants_list"], "test.wri_gppd_transform.not_null_gppd_power_plants_list_year_of_capacity_data.1a3165a676": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "child_map": {"model.wri_gppd_transform.gppd_power_plants_list": ["test.wri_gppd_transform.not_null_gppd_power_plants_list_capacity_mw.9f7ae55ef0", "test.wri_gppd_transform.not_null_gppd_power_plants_list_country.0d2e3aed2c", "test.wri_gppd_transform.not_null_gppd_power_plants_list_country_long.d394df506e", "test.wri_gppd_transform.not_null_gppd_power_plants_list_gppd_idnr.bb278f73bc", "test.wri_gppd_transform.not_null_gppd_power_plants_list_latitude.5cadb5eb49", "test.wri_gppd_transform.not_null_gppd_power_plants_list_longitude.b9a294aa23", "test.wri_gppd_transform.not_null_gppd_power_plants_list_name.a415d9e2a5", "test.wri_gppd_transform.not_null_gppd_power_plants_list_year_of_capacity_data.1a3165a676", "test.wri_gppd_transform.unique_gppd_power_plants_list_gppd_idnr.85ac978899", "test.wri_gppd_transform.unique_gppd_power_plants_list_name.37c2d0f477"], "test.wri_gppd_transform.unique_gppd_power_plants_list_gppd_idnr.85ac978899": [], "test.wri_gppd_transform.not_null_gppd_power_plants_list_gppd_idnr.bb278f73bc": [], "test.wri_gppd_transform.unique_gppd_power_plants_list_name.37c2d0f477": [], "test.wri_gppd_transform.not_null_gppd_power_plants_list_name.a415d9e2a5": [], "test.wri_gppd_transform.not_null_gppd_power_plants_list_country.0d2e3aed2c": [], "test.wri_gppd_transform.not_null_gppd_power_plants_list_country_long.d394df506e": [], "test.wri_gppd_transform.not_null_gppd_power_plants_list_latitude.5cadb5eb49": [], "test.wri_gppd_transform.not_null_gppd_power_plants_list_longitude.b9a294aa23": [], "test.wri_gppd_transform.not_null_gppd_power_plants_list_capacity_mw.9f7ae55ef0": [], "test.wri_gppd_transform.not_null_gppd_power_plants_list_year_of_capacity_data.1a3165a676": []}} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/manifest/v10.json", "dbt_version": "1.6.5", "generated_at": "2023-10-06T12:57:52.097526Z", "invocation_id": "4aac4fa9-86e6-4cd4-ba70-d02d18c66aeb", "env": {}, "project_name": "wri_gppd_transform", "project_id": "85b3abc44205b53623a178810d690704", "user_id": "c8415488-1025-471c-9cb5-6cff279d771d", "send_anonymous_usage_stats": true, "adapter_type": "trino"}, "nodes": {"model.wri_gppd_transform.gppd_power_plants_list": {"database": "osc_datacommons_dev", "schema": "wri_gppd", "name": "gppd_power_plants_list", "resource_type": "model", "package_name": "wri_gppd_transform", "path": "gppd_power_plants_list.sql", "original_file_path": "models/gppd_power_plants_list.sql", "unique_id": "model.wri_gppd_transform.gppd_power_plants_list", "fqn": ["wri_gppd_transform", "gppd_power_plants_list"], "alias": "gppd_power_plants_list", "checksum": {"name": "sha256", "checksum": "39394249e263ac4b3b3bc74456f28ccdd775a0fa653c3b73437cd0c581ce69c1"}, "config": {"enabled": true, "alias": null, "schema": null, "database": null, "tags": [], "meta": {}, "group": null, "materialized": "view", "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}, "view_security": "invoker", "post-hook": [], "pre-hook": []}, "tags": [], "description": "Open-source open-access dataset of grid-scale (1 MW and greater) electricity generating facilities operating across the world", "columns": {"gppd_idnr": {"name": "gppd_idnr", "description": "10 or 12 character identifier for the power plant", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "name": {"name": "name", "description": "name or title of the power plant, generally in Romanized form", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "country": {"name": "country", "description": "3 character country code corresponding to the ISO 3166-1 alpha-3 specification", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "country_long": {"name": "country_long", "description": "longer form of the country designation", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "latitude": {"name": "latitude", "description": "geolocation in decimal degrees", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "longitude": {"name": "longitude", "description": "geolocation in decimal degrees", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "capacity_mw": {"name": "capacity_mw", "description": "electrical generating capacity in megawatts", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}, "year_of_capacity_data": {"name": "year_of_capacity_data", "description": "year the capacity information was reported", "meta": {}, "data_type": null, "constraints": [], "quote": null, "tags": []}}, "meta": {}, "group": null, "docs": {"show": true, "node_color": null}, "patch_path": "wri_gppd_transform://models/gppd_power_plants_list_schema.yml", "build_path": null, "deferred": false, "unrendered_config": {"materialized": "view", "view_security": "invoker"}, "created_at": 1696597057.697506, "relation_name": "osc_datacommons_dev.wri_gppd.gppd_power_plants_list", "raw_code": "{{\n config(\n materialized = 'view',\n view_security = 'invoker'\n )\n}}\n\nwith source_data as (\n select gppd_idnr,name,country,country_long,latitude,longitude,capacity_mw, year_of_capacity_data, \n primary_fuel,other_fuel1,other_fuel2,other_fuel3,commissioning_year,owner \n from osc_datacommons_dev.wri_gppd.gppd_source\n)\n\nselect * from source_data", "language": "sql", "refs": [], "sources": [], "metrics": [], "depends_on": {"macros": [], "nodes": []}, "compiled_path": null, "contract": {"enforced": false, "checksum": null}, "access": "protected", "constraints": [], "version": null, "latest_version": null, "deprecation_date": null}, "test.wri_gppd_transform.unique_gppd_power_plants_list_gppd_idnr.85ac978899": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "gppd_idnr", "model": "{{ get_where_subquery(ref('gppd_power_plants_list')) }}"}, "namespace": null}, "database": "osc_datacommons_dev", "schema": "wri_gppd_dbt_test__audit", "name": "unique_gppd_power_plants_list_gppd_idnr", "resource_type": "test", "package_name": "wri_gppd_transform", "path": "unique_gppd_power_plants_list_gppd_idnr.sql", "original_file_path": "models/gppd_power_plants_list_schema.yml", "unique_id": "test.wri_gppd_transform.unique_gppd_power_plants_list_gppd_idnr.85ac978899", "fqn": ["wri_gppd_transform", "unique_gppd_power_plants_list_gppd_idnr"], "alias": "unique_gppd_power_plants_list_gppd_idnr", "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": "target/run/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/unique_gppd_power_plants_list_gppd_idnr.sql", "deferred": false, "unrendered_config": {}, "created_at": 1696597057.718594, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "gppd_power_plants_list", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery", "macro.dbt.should_store_failures", "macro.dbt.statement"], "nodes": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/unique_gppd_power_plants_list_gppd_idnr.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n gppd_idnr as unique_field,\n count(*) as n_records\n\nfrom osc_datacommons_dev.wri_gppd.gppd_power_plants_list\nwhere gppd_idnr is not null\ngroup by gppd_idnr\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "gppd_idnr", "file_key_name": "models.gppd_power_plants_list", "attached_node": "model.wri_gppd_transform.gppd_power_plants_list"}, "test.wri_gppd_transform.not_null_gppd_power_plants_list_gppd_idnr.bb278f73bc": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "gppd_idnr", "model": "{{ get_where_subquery(ref('gppd_power_plants_list')) }}"}, "namespace": null}, "database": "osc_datacommons_dev", "schema": "wri_gppd_dbt_test__audit", "name": "not_null_gppd_power_plants_list_gppd_idnr", "resource_type": "test", "package_name": "wri_gppd_transform", "path": "not_null_gppd_power_plants_list_gppd_idnr.sql", "original_file_path": "models/gppd_power_plants_list_schema.yml", "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_gppd_idnr.bb278f73bc", "fqn": ["wri_gppd_transform", "not_null_gppd_power_plants_list_gppd_idnr"], "alias": "not_null_gppd_power_plants_list_gppd_idnr", "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": "target/run/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_gppd_idnr.sql", "deferred": false, "unrendered_config": {}, "created_at": 1696597057.7217438, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "gppd_power_plants_list", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery", "macro.dbt.should_store_failures", "macro.dbt.statement"], "nodes": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_gppd_idnr.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect gppd_idnr\nfrom osc_datacommons_dev.wri_gppd.gppd_power_plants_list\nwhere gppd_idnr is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "gppd_idnr", "file_key_name": "models.gppd_power_plants_list", "attached_node": "model.wri_gppd_transform.gppd_power_plants_list"}, "test.wri_gppd_transform.unique_gppd_power_plants_list_name.37c2d0f477": {"test_metadata": {"name": "unique", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(ref('gppd_power_plants_list')) }}"}, "namespace": null}, "database": "osc_datacommons_dev", "schema": "wri_gppd_dbt_test__audit", "name": "unique_gppd_power_plants_list_name", "resource_type": "test", "package_name": "wri_gppd_transform", "path": "unique_gppd_power_plants_list_name.sql", "original_file_path": "models/gppd_power_plants_list_schema.yml", "unique_id": "test.wri_gppd_transform.unique_gppd_power_plants_list_name.37c2d0f477", "fqn": ["wri_gppd_transform", "unique_gppd_power_plants_list_name"], "alias": "unique_gppd_power_plants_list_name", "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": "target/run/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/unique_gppd_power_plants_list_name.sql", "deferred": false, "unrendered_config": {}, "created_at": 1696597057.7247832, "relation_name": null, "raw_code": "{{ test_unique(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "gppd_power_plants_list", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_unique", "macro.dbt.get_where_subquery", "macro.dbt.should_store_failures", "macro.dbt.statement"], "nodes": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/unique_gppd_power_plants_list_name.sql", "compiled": true, "compiled_code": "\n \n \n\nselect\n name as unique_field,\n count(*) as n_records\n\nfrom osc_datacommons_dev.wri_gppd.gppd_power_plants_list\nwhere name is not null\ngroup by name\nhaving count(*) > 1\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "name", "file_key_name": "models.gppd_power_plants_list", "attached_node": "model.wri_gppd_transform.gppd_power_plants_list"}, "test.wri_gppd_transform.not_null_gppd_power_plants_list_name.a415d9e2a5": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "name", "model": "{{ get_where_subquery(ref('gppd_power_plants_list')) }}"}, "namespace": null}, "database": "osc_datacommons_dev", "schema": "wri_gppd_dbt_test__audit", "name": "not_null_gppd_power_plants_list_name", "resource_type": "test", "package_name": "wri_gppd_transform", "path": "not_null_gppd_power_plants_list_name.sql", "original_file_path": "models/gppd_power_plants_list_schema.yml", "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_name.a415d9e2a5", "fqn": ["wri_gppd_transform", "not_null_gppd_power_plants_list_name"], "alias": "not_null_gppd_power_plants_list_name", "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": "target/run/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_name.sql", "deferred": false, "unrendered_config": {}, "created_at": 1696597057.727979, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "gppd_power_plants_list", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery", "macro.dbt.should_store_failures", "macro.dbt.statement"], "nodes": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_name.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect name\nfrom osc_datacommons_dev.wri_gppd.gppd_power_plants_list\nwhere name is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "name", "file_key_name": "models.gppd_power_plants_list", "attached_node": "model.wri_gppd_transform.gppd_power_plants_list"}, "test.wri_gppd_transform.not_null_gppd_power_plants_list_country.0d2e3aed2c": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "country", "model": "{{ get_where_subquery(ref('gppd_power_plants_list')) }}"}, "namespace": null}, "database": "osc_datacommons_dev", "schema": "wri_gppd_dbt_test__audit", "name": "not_null_gppd_power_plants_list_country", "resource_type": "test", "package_name": "wri_gppd_transform", "path": "not_null_gppd_power_plants_list_country.sql", "original_file_path": "models/gppd_power_plants_list_schema.yml", "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_country.0d2e3aed2c", "fqn": ["wri_gppd_transform", "not_null_gppd_power_plants_list_country"], "alias": "not_null_gppd_power_plants_list_country", "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": "target/run/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_country.sql", "deferred": false, "unrendered_config": {}, "created_at": 1696597057.7309406, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "gppd_power_plants_list", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery", "macro.dbt.should_store_failures", "macro.dbt.statement"], "nodes": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_country.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect country\nfrom osc_datacommons_dev.wri_gppd.gppd_power_plants_list\nwhere country is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "country", "file_key_name": "models.gppd_power_plants_list", "attached_node": "model.wri_gppd_transform.gppd_power_plants_list"}, "test.wri_gppd_transform.not_null_gppd_power_plants_list_country_long.d394df506e": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "country_long", "model": "{{ get_where_subquery(ref('gppd_power_plants_list')) }}"}, "namespace": null}, "database": "osc_datacommons_dev", "schema": "wri_gppd_dbt_test__audit", "name": "not_null_gppd_power_plants_list_country_long", "resource_type": "test", "package_name": "wri_gppd_transform", "path": "not_null_gppd_power_plants_list_country_long.sql", "original_file_path": "models/gppd_power_plants_list_schema.yml", "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_country_long.d394df506e", "fqn": ["wri_gppd_transform", "not_null_gppd_power_plants_list_country_long"], "alias": "not_null_gppd_power_plants_list_country_long", "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": "target/run/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_country_long.sql", "deferred": false, "unrendered_config": {}, "created_at": 1696597057.7339346, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "gppd_power_plants_list", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery", "macro.dbt.should_store_failures", "macro.dbt.statement"], "nodes": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_country_long.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect country_long\nfrom osc_datacommons_dev.wri_gppd.gppd_power_plants_list\nwhere country_long is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "country_long", "file_key_name": "models.gppd_power_plants_list", "attached_node": "model.wri_gppd_transform.gppd_power_plants_list"}, "test.wri_gppd_transform.not_null_gppd_power_plants_list_latitude.5cadb5eb49": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "latitude", "model": "{{ get_where_subquery(ref('gppd_power_plants_list')) }}"}, "namespace": null}, "database": "osc_datacommons_dev", "schema": "wri_gppd_dbt_test__audit", "name": "not_null_gppd_power_plants_list_latitude", "resource_type": "test", "package_name": "wri_gppd_transform", "path": "not_null_gppd_power_plants_list_latitude.sql", "original_file_path": "models/gppd_power_plants_list_schema.yml", "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_latitude.5cadb5eb49", "fqn": ["wri_gppd_transform", "not_null_gppd_power_plants_list_latitude"], "alias": "not_null_gppd_power_plants_list_latitude", "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": "target/run/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_latitude.sql", "deferred": false, "unrendered_config": {}, "created_at": 1696597057.73698, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "gppd_power_plants_list", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery", "macro.dbt.should_store_failures", "macro.dbt.statement"], "nodes": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_latitude.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect latitude\nfrom osc_datacommons_dev.wri_gppd.gppd_power_plants_list\nwhere latitude is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "latitude", "file_key_name": "models.gppd_power_plants_list", "attached_node": "model.wri_gppd_transform.gppd_power_plants_list"}, "test.wri_gppd_transform.not_null_gppd_power_plants_list_longitude.b9a294aa23": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "longitude", "model": "{{ get_where_subquery(ref('gppd_power_plants_list')) }}"}, "namespace": null}, "database": "osc_datacommons_dev", "schema": "wri_gppd_dbt_test__audit", "name": "not_null_gppd_power_plants_list_longitude", "resource_type": "test", "package_name": "wri_gppd_transform", "path": "not_null_gppd_power_plants_list_longitude.sql", "original_file_path": "models/gppd_power_plants_list_schema.yml", "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_longitude.b9a294aa23", "fqn": ["wri_gppd_transform", "not_null_gppd_power_plants_list_longitude"], "alias": "not_null_gppd_power_plants_list_longitude", "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": "target/run/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_longitude.sql", "deferred": false, "unrendered_config": {}, "created_at": 1696597057.7400117, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "gppd_power_plants_list", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery", "macro.dbt.should_store_failures", "macro.dbt.statement"], "nodes": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_longitude.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect longitude\nfrom osc_datacommons_dev.wri_gppd.gppd_power_plants_list\nwhere longitude is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "longitude", "file_key_name": "models.gppd_power_plants_list", "attached_node": "model.wri_gppd_transform.gppd_power_plants_list"}, "test.wri_gppd_transform.not_null_gppd_power_plants_list_capacity_mw.9f7ae55ef0": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "capacity_mw", "model": "{{ get_where_subquery(ref('gppd_power_plants_list')) }}"}, "namespace": null}, "database": "osc_datacommons_dev", "schema": "wri_gppd_dbt_test__audit", "name": "not_null_gppd_power_plants_list_capacity_mw", "resource_type": "test", "package_name": "wri_gppd_transform", "path": "not_null_gppd_power_plants_list_capacity_mw.sql", "original_file_path": "models/gppd_power_plants_list_schema.yml", "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_capacity_mw.9f7ae55ef0", "fqn": ["wri_gppd_transform", "not_null_gppd_power_plants_list_capacity_mw"], "alias": "not_null_gppd_power_plants_list_capacity_mw", "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": "target/run/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_capacity_mw.sql", "deferred": false, "unrendered_config": {}, "created_at": 1696597057.7439094, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "gppd_power_plants_list", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery", "macro.dbt.should_store_failures", "macro.dbt.statement"], "nodes": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_capacity_mw.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect capacity_mw\nfrom osc_datacommons_dev.wri_gppd.gppd_power_plants_list\nwhere capacity_mw is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "capacity_mw", "file_key_name": "models.gppd_power_plants_list", "attached_node": "model.wri_gppd_transform.gppd_power_plants_list"}, "test.wri_gppd_transform.not_null_gppd_power_plants_list_year_of_capacity_data.1a3165a676": {"test_metadata": {"name": "not_null", "kwargs": {"column_name": "year_of_capacity_data", "model": "{{ get_where_subquery(ref('gppd_power_plants_list')) }}"}, "namespace": null}, "database": "osc_datacommons_dev", "schema": "wri_gppd_dbt_test__audit", "name": "not_null_gppd_power_plants_list_year_of_capacity_data", "resource_type": "test", "package_name": "wri_gppd_transform", "path": "not_null_gppd_power_plants_list_year_of_capacity_data.sql", "original_file_path": "models/gppd_power_plants_list_schema.yml", "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_year_of_capacity_data.1a3165a676", "fqn": ["wri_gppd_transform", "not_null_gppd_power_plants_list_year_of_capacity_data"], "alias": "not_null_gppd_power_plants_list_year_of_capacity_data", "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": "target/run/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_year_of_capacity_data.sql", "deferred": false, "unrendered_config": {}, "created_at": 1696597057.7468328, "relation_name": null, "raw_code": "{{ test_not_null(**_dbt_generic_test_kwargs) }}", "language": "sql", "refs": [{"name": "gppd_power_plants_list", "package": null, "version": null}], "sources": [], "metrics": [], "depends_on": {"macros": ["macro.dbt.test_not_null", "macro.dbt.get_where_subquery", "macro.dbt.should_store_failures", "macro.dbt.statement"], "nodes": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "compiled_path": "target/compiled/wri_gppd_transform/models/gppd_power_plants_list_schema.yml/not_null_gppd_power_plants_list_year_of_capacity_data.sql", "compiled": true, "compiled_code": "\n \n \n\n\n\nselect year_of_capacity_data\nfrom osc_datacommons_dev.wri_gppd.gppd_power_plants_list\nwhere year_of_capacity_data is null\n\n\n", "extra_ctes_injected": true, "extra_ctes": [], "contract": {"enforced": false, "checksum": null}, "column_name": "year_of_capacity_data", "file_key_name": "models.gppd_power_plants_list", "attached_node": "model.wri_gppd_transform.gppd_power_plants_list"}}, "sources": {}, "macros": {"macro.dbt_trino.trino__get_columns_in_relation": {"name": "trino__get_columns_in_relation", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_trino.trino__get_columns_in_relation", "macro_sql": "{% macro trino__get_columns_in_relation(relation) -%}\n {%- set sql -%}\n describe {{ relation }}\n {%- endset -%}\n {%- set result = run_query(sql) -%}\n\n {% set maximum = 10000 %}\n {% if (result | length) >= maximum %}\n {% set msg %}\n Too many columns in relation {{ relation }}! dbt can only get\n information about relations with fewer than {{ maximum }} columns.\n {% endset %}\n {% do exceptions.raise_compiler_error(msg) %}\n {% endif %}\n\n {% set columns = [] %}\n {% for row in result %}\n {% do columns.append(api.Column.from_description(row['Column'].lower(), row['Type'])) %}\n {% endfor %}\n {% do return(columns) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.8856575, "supported_languages": null}, "macro.dbt_trino.trino__list_relations_without_caching": {"name": "trino__list_relations_without_caching", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_trino.trino__list_relations_without_caching", "macro_sql": "{% macro trino__list_relations_without_caching(relation) %}\n {% call statement('list_relations_without_caching', fetch_result=True) -%}\n select\n t.table_catalog as database,\n t.table_name as name,\n t.table_schema as schema,\n case when mv.name is not null then 'materialized_view'\n when t.table_type = 'BASE TABLE' then 'table'\n when t.table_type = 'VIEW' then 'view'\n else t.table_type\n end as table_type\n from {{ relation.information_schema() }}.tables t\n left join system.metadata.materialized_views mv\n on mv.catalog_name = t.table_catalog and mv.schema_name = t.table_schema and mv.name = t.table_name\n where t.table_schema = '{{ relation.schema | lower }}'\n and (mv.catalog_name is null or mv.catalog_name = '{{ relation.database | lower }}')\n and (mv.schema_name is null or mv.schema_name = '{{ relation.schema | lower }}')\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": 1696597056.886567, "supported_languages": null}, "macro.dbt_trino.trino__reset_csv_table": {"name": "trino__reset_csv_table", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_trino.trino__reset_csv_table", "macro_sql": "{% macro trino__reset_csv_table(model, full_refresh, old_relation, agate_table) %}\n {{ adapter.drop_relation(old_relation) }}\n {{ return(create_csv_table(model, agate_table)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.8870754, "supported_languages": null}, "macro.dbt_trino.trino__create_csv_table": {"name": "trino__create_csv_table", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_trino.trino__create_csv_table", "macro_sql": "{% macro trino__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 {%- set _properties = config.get('properties') -%}\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 ) {{ properties(_properties) }}\n {% endset %}\n\n {% call statement('_') -%}\n {{ sql }}\n {%- endcall %}\n\n {{ return(sql) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt_trino.properties", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.889051, "supported_languages": null}, "macro.dbt_trino.properties": {"name": "properties", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_trino.properties", "macro_sql": "{% macro properties(properties) %}\n {%- if properties is not none -%}\n WITH (\n {%- for key, value in properties.items() -%}\n {{ key }} = {{ value }}\n {%- if not loop.last -%}{{ ',\\n ' }}{%- endif -%}\n {%- endfor -%}\n )\n {%- endif -%}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.8897595, "supported_languages": null}, "macro.dbt_trino.comment": {"name": "comment", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_trino.comment", "macro_sql": "{% macro comment(comment) %}\n {%- if comment is not none and comment|length > 0 -%}\n comment '{{ comment | replace(\"'\", \"''\") }}'\n {%- endif -%}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.8902786, "supported_languages": null}, "macro.dbt_trino.trino__create_table_as": {"name": "trino__create_table_as", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_trino.trino__create_table_as", "macro_sql": "{% macro trino__create_table_as(temporary, relation, sql) -%}\n {%- set _properties = config.get('properties') -%}\n\n {%- set contract_config = config.get('contract') -%}\n {%- if contract_config.enforced -%}\n\n create table\n {{ relation }}\n {{ get_table_columns_and_constraints() }}\n {{ get_assert_columns_equivalent(sql) }}\n {%- set sql = get_select_subquery(sql) %}\n {{ comment(model.get('description')) }}\n {{ properties(_properties) }}\n ;\n\n insert into {{ relation }}\n (\n {{ sql }}\n )\n ;\n\n {%- else %}\n\n create table {{ relation }}\n {{ comment(model.get('description')) }}\n {{ properties(_properties) }}\n as (\n {{ sql }}\n );\n\n {%- endif %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_table_columns_and_constraints", "macro.dbt.get_assert_columns_equivalent", "macro.dbt.get_select_subquery", "macro.dbt_trino.comment", "macro.dbt_trino.properties"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.8917394, "supported_languages": null}, "macro.dbt_trino.trino__create_view_as": {"name": "trino__create_view_as", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_trino.trino__create_view_as", "macro_sql": "{% macro trino__create_view_as(relation, sql) -%}\n {%- set view_security = config.get('view_security', 'definer') -%}\n {%- if view_security not in ['definer', 'invoker'] -%}\n {%- set log_message = 'Invalid value for view_security (%s) specified. Setting default value (%s).' % (view_security, 'definer') -%}\n {% do log(log_message) %}\n {%- set on_table_exists = 'definer' -%}\n {% endif %}\n create or replace view\n {{ relation }}\n {%- set contract_config = config.get('contract') -%}\n {%- if contract_config.enforced -%}\n {{ get_assert_columns_equivalent(sql) }}\n {%- endif %}\n security {{ view_security }}\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": 1696597056.893031, "supported_languages": null}, "macro.dbt_trino.trino__drop_relation": {"name": "trino__drop_relation", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_trino.trino__drop_relation", "macro_sql": "{% macro trino__drop_relation(relation) -%}\n {% set relation_type = relation.type|replace(\"_\", \" \") %}\n {% call statement('drop_relation', auto_begin=False) -%}\n drop {{ relation_type }} if exists {{ 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": 1696597056.8936317, "supported_languages": null}, "macro.dbt_trino.trino__information_schema_name": {"name": "trino__information_schema_name", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_trino.trino__information_schema_name", "macro_sql": "{% macro trino__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": 1696597056.8939772, "supported_languages": null}, "macro.dbt_trino.trino__drop_schema": {"name": "trino__drop_schema", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_trino.trino__drop_schema", "macro_sql": "{% macro trino__drop_schema(relation) -%}\n {% for row in list_relations_without_caching(relation) %}\n {% set rel_db = row[0] %}\n {% set rel_identifier = row[1] %}\n {% set rel_schema = row[2] %}\n {% set rel_type = api.Relation.get_relation_type(row[3]) %}\n {% set existing = api.Relation.create(database=rel_db, schema=rel_schema, identifier=rel_identifier, type=rel_type) %}\n {% do drop_relation(existing) %}\n {% endfor %}\n {%- call statement('drop_schema') -%}\n drop schema if exists {{ relation }}\n {% endcall %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.list_relations_without_caching", "macro.dbt.drop_relation", "macro.dbt.statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.8953469, "supported_languages": null}, "macro.dbt_trino.trino__rename_relation": {"name": "trino__rename_relation", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_trino.trino__rename_relation", "macro_sql": "{% macro trino__rename_relation(from_relation, to_relation) -%}\n {% set from_relation_type = from_relation.type|replace(\"_\", \" \") %}\n {% call statement('rename_relation') -%}\n alter {{ from_relation_type }} {{ from_relation }} rename to {{ to_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": 1696597056.8959801, "supported_languages": null}, "macro.dbt_trino.trino__alter_relation_comment": {"name": "trino__alter_relation_comment", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_trino.trino__alter_relation_comment", "macro_sql": "{% macro trino__alter_relation_comment(relation, relation_comment) -%}\n comment on {{ relation.type }} {{ relation }} is '{{ relation_comment | replace(\"'\", \"''\") }}';\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.89639, "supported_languages": null}, "macro.dbt_trino.trino__alter_column_comment": {"name": "trino__alter_column_comment", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_trino.trino__alter_column_comment", "macro_sql": "{% macro trino__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 {%- if comment|length -%}\n comment on column {{ relation }}.{{ adapter.quote(column_name) if column_dict[column_name]['quote'] else column_name }} is '{{ comment | replace(\"'\", \"''\") }}';\n {%- else -%}\n comment on column {{ relation }}.{{ adapter.quote(column_name) if column_dict[column_name]['quote'] else column_name }} is null;\n {%- endif -%}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.8978806, "supported_languages": null}, "macro.dbt_trino.trino__list_schemas": {"name": "trino__list_schemas", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_trino.trino__list_schemas", "macro_sql": "{% macro trino__list_schemas(database) -%}\n {% call statement('list_schemas', fetch_result=True, auto_begin=False) %}\n select distinct schema_name\n from {{ information_schema_name(database) }}.schemata\n {% endcall %}\n {{ return(load_result('list_schemas').table) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.statement", "macro.dbt.information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.8984852, "supported_languages": null}, "macro.dbt_trino.trino__check_schema_exists": {"name": "trino__check_schema_exists", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_trino.trino__check_schema_exists", "macro_sql": "{% macro trino__check_schema_exists(information_schema, schema) -%}\n {% call statement('check_schema_exists', fetch_result=True, auto_begin=False) -%}\n select count(*)\n from {{ information_schema }}.schemata\n where catalog_name = '{{ information_schema.database }}'\n and schema_name = '{{ schema | lower }}'\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": 1696597056.8991947, "supported_languages": null}, "macro.dbt_trino.trino__get_binding_char": {"name": "trino__get_binding_char", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_trino.trino__get_binding_char", "macro_sql": "{% macro trino__get_binding_char() %}\n {%- if target.prepared_statements_enabled|as_bool -%}\n {{ return('?') }}\n {%- else -%}\n {{ return('%s') }}\n {%- endif -%}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.8996406, "supported_languages": null}, "macro.dbt_trino.trino__alter_relation_add_remove_columns": {"name": "trino__alter_relation_add_remove_columns", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_trino.trino__alter_relation_add_remove_columns", "macro_sql": "{% macro trino__alter_relation_add_remove_columns(relation, add_columns, remove_columns) %}\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 {% for column in add_columns %}\n {% set sql -%}\n alter {{ relation.type }} {{ relation }} add column {{ column.name }} {{ column.data_type }}\n {%- endset -%}\n {% do run_query(sql) %}\n {% endfor %}\n\n {% for column in remove_columns %}\n {% set sql -%}\n alter {{ relation.type }} {{ relation }} drop column {{ column.name }}\n {%- endset -%}\n {% do run_query(sql) %}\n {% endfor %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.run_query"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9011586, "supported_languages": null}, "macro.dbt_trino.create_or_replace_view": {"name": "create_or_replace_view", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_trino.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 is another object delete it\n {%- if old_relation is not none and not old_relation.is_view -%}\n {{ handle_existing_table(should_full_refresh(), old_relation) }}\n {%- endif -%}\n\n -- build model\n {% call statement('main') -%}\n {{ get_create_view_as_sql(target_relation, sql) }}\n {%- endcall %}\n\n {% set should_revoke = should_revoke(exists_as_view, full_refresh_mode=True) %}\n {% do apply_grants(target_relation, grant_config, should_revoke=True) %}\n\n {{ run_hooks(post_hooks) }}\n\n {{ return({'relations': [target_relation]}) }}\n{% 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": 1696597056.9034524, "supported_languages": null}, "macro.dbt_trino.trino__alter_column_type": {"name": "trino__alter_column_type", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/adapters.sql", "original_file_path": "macros/adapters.sql", "unique_id": "macro.dbt_trino.trino__alter_column_type", "macro_sql": "{% macro trino__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\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) }} = CAST({{ adapter.quote(column_name) }} AS {{ new_column_type }});\n alter table {{ relation }} drop column {{ adapter.quote(column_name) }};\n alter table {{ relation }} rename column {{ adapter.quote(tmp_column) }} to {{ adapter.quote(column_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": 1696597056.904681, "supported_languages": null}, "macro.dbt_trino.trino__get_show_grant_sql": {"name": "trino__get_show_grant_sql", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/apply_grants.sql", "original_file_path": "macros/apply_grants.sql", "unique_id": "macro.dbt_trino.trino__get_show_grant_sql", "macro_sql": "{% macro trino__get_show_grant_sql(relation) -%}\n select\n grantee,\n lower(privilege_type) as privilege_type\n from information_schema.table_privileges\n where table_catalog = '{{ relation.database }}'\n and table_schema = '{{ relation.schema }}'\n and table_name = '{{ relation.identifier }}'\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9056268, "supported_languages": null}, "macro.dbt_trino.trino__copy_grants": {"name": "trino__copy_grants", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/apply_grants.sql", "original_file_path": "macros/apply_grants.sql", "unique_id": "macro.dbt_trino.trino__copy_grants", "macro_sql": "{% macro trino__copy_grants() %}\n {#\n -- This macro should return true or false depending on the answer to\n -- following question:\n -- when an object is fully replaced on your database, do grants copy over?\n -- e.g. on Postgres this is never true,\n -- on Spark this is different for views vs. non-Delta tables vs. Delta tables,\n -- on Snowflake it depends on the user-supplied copy_grants configuration.\n -- true by default, which means \u201cplay it safe\u201d: grants MIGHT have copied over,\n -- so dbt will run an extra query to check them + calculate diffs.\n #}\n {{ return(False) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9059322, "supported_languages": null}, "macro.dbt_trino.trino__get_grant_sql": {"name": "trino__get_grant_sql", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/apply_grants.sql", "original_file_path": "macros/apply_grants.sql", "unique_id": "macro.dbt_trino.trino__get_grant_sql", "macro_sql": "\n\n{%- macro trino__get_grant_sql(relation, privilege, grantees) -%}\n grant {{ privilege }} on {{ relation }} to {{ adapter.quote(grantees[0]) }}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9063408, "supported_languages": null}, "macro.dbt_trino.trino__support_multiple_grantees_per_dcl_statement": {"name": "trino__support_multiple_grantees_per_dcl_statement", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/apply_grants.sql", "original_file_path": "macros/apply_grants.sql", "unique_id": "macro.dbt_trino.trino__support_multiple_grantees_per_dcl_statement", "macro_sql": "\n\n{%- macro trino__support_multiple_grantees_per_dcl_statement() -%}\n {#\n -- This macro should return true or false depending on the answer to\n -- following question:\n -- does this database support grant {privilege} to user_a, user_b, ...?\n -- or do user_a + user_b need their own separate grant statements?\n #}\n {{ return(False) }}\n{%- endmacro -%}\n\n", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9065983, "supported_languages": null}, "macro.dbt_trino.trino__call_dcl_statements": {"name": "trino__call_dcl_statements", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/apply_grants.sql", "original_file_path": "macros/apply_grants.sql", "unique_id": "macro.dbt_trino.trino__call_dcl_statements", "macro_sql": "{% macro trino__call_dcl_statements(dcl_statement_list) %}\n {% for dcl_statement in dcl_statement_list %}\n {% call statement('grant_or_revoke') %}\n {{ dcl_statement }}\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": 1696597056.9070847, "supported_languages": null}, "macro.dbt_trino.trino__get_catalog": {"name": "trino__get_catalog", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/catalog.sql", "original_file_path": "macros/catalog.sql", "unique_id": "macro.dbt_trino.trino__get_catalog", "macro_sql": "{% macro trino__get_catalog(information_schema, schemas) -%}\n {%- call statement('catalog', fetch_result=True) -%}\n with tables as (\n\n select\n table_catalog as \"table_database\",\n table_schema as \"table_schema\",\n table_name as \"table_name\",\n table_type as \"table_type\",\n null as \"table_owner\"\n\n from {{ information_schema }}.tables\n where\n table_schema != 'information_schema'\n and\n table_schema in ('{{ schemas | join(\"','\") | lower }}')\n\n ),\n\n columns as (\n\n select\n table_catalog as \"table_database\",\n table_schema as \"table_schema\",\n table_name as \"table_name\",\n\n column_name as \"column_name\",\n ordinal_position as \"column_index\",\n data_type as \"column_type\",\n comment as \"column_comment\"\n\n from {{ information_schema }}.columns\n where\n table_schema != 'information_schema'\n and\n table_schema in ('{{ schemas | join(\"','\") | lower }}')\n\n ),\n\n table_comment as (\n {%- for schema in schemas %}\n select\n catalog_name as \"table_database\",\n schema_name as \"table_schema\",\n table_name as \"table_name\",\n comment as \"table_comment\"\n\n from system.metadata.table_comments\n where\n catalog_name = '{{ information_schema.database }}'\n and\n schema_name != 'information_schema'\n and\n schema_name = '{{ schema | lower }}'\n {% if not loop.last %}\n union all\n {% endif %}\n {%- endfor %}\n )\n\n select\n table_database,\n table_schema,\n table_name,\n table_type,\n table_owner,\n column_name,\n column_index,\n column_type,\n column_comment,\n table_comment\n from tables\n join columns using (\"table_database\", \"table_schema\", \"table_name\")\n join table_comment using (\"table_database\", \"table_schema\", \"table_name\")\n order by \"column_index\"\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": 1696597056.9095433, "supported_languages": null}, "macro.dbt_trino.get_incremental_tmp_relation_type": {"name": "get_incremental_tmp_relation_type", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "unique_id": "macro.dbt_trino.get_incremental_tmp_relation_type", "macro_sql": "{% macro get_incremental_tmp_relation_type(strategy, unique_key, language) %}\n\n /* {#\n If we are running multiple statements (DELETE + INSERT),\n we must first save the model query results as a temporary table\n in order to guarantee consistent inputs to both statements.\n\n If we are running a single statement (MERGE or INSERT alone),\n we can save the model query definition as a view instead,\n for faster overall incremental processing.\n #} */\n {%- set views_enabled = config.get('views_enabled', true) -%}\n\n {% if language == 'sql' and (views_enabled and (strategy in ('default', 'append', 'merge') or (unique_key is none))) %}\n {{ return('view') }}\n {% else %} {#-- play it safe -- #}\n {{ return('table') }}\n {% endif %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9209478, "supported_languages": null}, "macro.dbt_trino.materialization_incremental_trino": {"name": "materialization_incremental_trino", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "unique_id": "macro.dbt_trino.materialization_incremental_trino", "macro_sql": "{% materialization incremental, adapter='trino', supported_languages=['sql'] -%}\n\n {#-- Set vars --#}\n {%- set full_refresh_mode = (should_full_refresh()) -%}\n {%- set language = model['language'] -%}\n {% set target_relation = this.incorporate(type='table') %}\n {% set existing_relation = load_relation(this) %}\n\n {#-- The temp relation will be a view (faster) or temp table, depending on upsert/merge strategy --#}\n {%- set unique_key = config.get('unique_key') -%}\n {% set incremental_strategy = config.get('incremental_strategy') or 'default' %}\n {% set tmp_relation_type = get_incremental_tmp_relation_type(incremental_strategy, unique_key, language) %}\n {% set tmp_relation = make_temp_relation(this).incorporate(type=tmp_relation_type) %}\n -- the temp_ 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_tmp_relation = load_cached_relation(tmp_relation)-%}\n\n {% set grant_config = config.get('grants') %}\n\n {% set on_schema_change = incremental_validate_on_schema_change(config.get('on_schema_change'), default='ignore') %}\n\n -- drop the temp relation if it exists already in the database\n {{ drop_relation_if_exists(preexisting_tmp_relation) }}\n\n {{ run_hooks(pre_hooks) }}\n\n {% if existing_relation is none %}\n {%- call statement('main', language=language) -%}\n {{ create_table_as(False, target_relation, compiled_code, language) }}\n {%- endcall -%}\n\n {% elif existing_relation.is_view %}\n {#-- Can't overwrite a view with a table - we must drop --#}\n {{ log(\"Dropping relation \" ~ target_relation ~ \" because it is a view and this model is a table.\") }}\n {% do adapter.drop_relation(existing_relation) %}\n {%- call statement('main', language=language) -%}\n {{ create_table_as(False, target_relation, compiled_code, language) }}\n {%- endcall -%}\n {% elif full_refresh_mode %}\n {#-- Can't replace a table - we must drop --#}\n {% do adapter.drop_relation(existing_relation) %}\n {%- call statement('main', language=language) -%}\n {{ create_table_as(False, target_relation, compiled_code, language) }}\n {%- endcall -%}\n\n {% else %}\n {#-- Create the temp relation, either as a view or as a temp table --#}\n {% if tmp_relation_type == 'view' %}\n {%- call statement('create_tmp_relation') -%}\n {{ create_view_as(tmp_relation, compiled_code) }}\n {%- endcall -%}\n {% else %}\n {%- call statement('create_tmp_relation', language=language) -%}\n {{ create_table_as(True, tmp_relation, compiled_code, language) }}\n {%- endcall -%}\n {% endif %}\n\n {% do adapter.expand_target_column_types(\n from_relation=tmp_relation,\n to_relation=target_relation) %}\n {#-- Process schema changes. Returns dict of changes if successful. Use source columns for upserting/merging --#}\n {% set dest_columns = process_schema_changes(on_schema_change, tmp_relation, existing_relation) %}\n {% if not dest_columns %}\n {% set dest_columns = adapter.get_columns_in_relation(existing_relation) %}\n {% endif %}\n\n {#-- Get the incremental_strategy, the macro to use for the strategy, and build the sql --#}\n {% set incremental_predicates = config.get('predicates', none) or config.get('incremental_predicates', none) %}\n {% set strategy_sql_macro_func = adapter.get_incremental_strategy_macro(context, incremental_strategy) %}\n {% set strategy_arg_dict = ({'target_relation': target_relation, 'temp_relation': tmp_relation, 'unique_key': unique_key, 'dest_columns': dest_columns, 'incremental_predicates': incremental_predicates }) %}\n\n {%- call statement('main') -%}\n {{ strategy_sql_macro_func(strategy_arg_dict) }}\n {%- endcall -%}\n {% endif %}\n\n {% do drop_relation_if_exists(tmp_relation) %}\n\n {{ run_hooks(post_hooks) }}\n\n {% set should_revoke =\n should_revoke(existing_relation.is_table, 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 {{ return({'relations': [target_relation]}) }}\n\n{%- endmaterialization %}", "depends_on": {"macros": ["macro.dbt.should_full_refresh", "macro.dbt.load_relation", "macro.dbt_trino.get_incremental_tmp_relation_type", "macro.dbt.make_temp_relation", "macro.dbt.load_cached_relation", "macro.dbt.incremental_validate_on_schema_change", "macro.dbt.drop_relation_if_exists", "macro.dbt.run_hooks", "macro.dbt.statement", "macro.dbt.create_table_as", "macro.dbt.create_view_as", "macro.dbt.process_schema_changes", "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": 1696597056.9272633, "supported_languages": ["sql"]}, "macro.dbt_trino.trino__get_delete_insert_merge_sql": {"name": "trino__get_delete_insert_merge_sql", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "unique_id": "macro.dbt_trino.trino__get_delete_insert_merge_sql", "macro_sql": "{% macro trino__get_delete_insert_merge_sql(target, source, unique_key, dest_columns, incremental_predicates) -%}\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 where\n {% for key in unique_key %}\n {{ target }}.{{ key }} in (select {{ key }} from {{ source }})\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{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.get_quoted_csv"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.929243, "supported_languages": null}, "macro.dbt_trino.trino__get_merge_sql": {"name": "trino__get_merge_sql", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/materializations/incremental.sql", "original_file_path": "macros/materializations/incremental.sql", "unique_id": "macro.dbt_trino.trino__get_merge_sql", "macro_sql": "{% macro trino__get_merge_sql(target, source, unique_key, dest_columns, incremental_predicates) -%}\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 dest_cols_csv_source = dest_cols_csv.split(', ') -%}\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\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 ({% for dest_cols in dest_cols_csv_source -%}\n DBT_INTERNAL_SOURCE.{{ dest_cols }}\n {%- if not loop.last %}, {% endif %}\n {%- endfor %})\n\n {% else %}\n insert into {{ target }} ({{ dest_cols_csv }})\n (\n select {{ dest_cols_csv }}\n from {{ source }}\n )\n {% endif %}\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": 1696597056.932663, "supported_languages": null}, "macro.dbt_trino.trino__get_create_materialized_view_as_sql": {"name": "trino__get_create_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/materializations/materialized_view.sql", "original_file_path": "macros/materializations/materialized_view.sql", "unique_id": "macro.dbt_trino.trino__get_create_materialized_view_as_sql", "macro_sql": "{%- macro trino__get_create_materialized_view_as_sql(target_relation, sql) -%}\n {%- set _properties = config.get('properties') -%}\n create materialized view {{ target_relation }}\n {{ properties(_properties) }}\n as\n {{ sql }}\n ;\n{%- endmacro -%}\n\n\n", "depends_on": {"macros": ["macro.dbt_trino.properties"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9338741, "supported_languages": null}, "macro.dbt_trino.trino__get_replace_materialized_view_as_sql": {"name": "trino__get_replace_materialized_view_as_sql", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/materializations/materialized_view.sql", "original_file_path": "macros/materializations/materialized_view.sql", "unique_id": "macro.dbt_trino.trino__get_replace_materialized_view_as_sql", "macro_sql": "{% macro trino__get_replace_materialized_view_as_sql(relation, sql, existing_relation, backup_relation, intermediate_relation) %}\n {{- trino__get_create_materialized_view_as_sql(intermediate_relation, sql) }}\n\n {% if existing_relation is not none %}\n {{ log(\"Found a \" ~ existing_relation.type ~ \" with same name. Will drop it\", info=true) }}\n alter {{ existing_relation.type|replace(\"_\", \" \") }} {{ 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_trino.trino__get_create_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9350116, "supported_languages": null}, "macro.dbt_trino.trino__get_materialized_view_configuration_changes": {"name": "trino__get_materialized_view_configuration_changes", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/materializations/materialized_view.sql", "original_file_path": "macros/materializations/materialized_view.sql", "unique_id": "macro.dbt_trino.trino__get_materialized_view_configuration_changes", "macro_sql": "{% macro trino__get_materialized_view_configuration_changes(existing_relation, new_config) %}\n {% do return(None) %}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.93532, "supported_languages": null}, "macro.dbt_trino.trino__refresh_materialized_view": {"name": "trino__refresh_materialized_view", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/materializations/materialized_view.sql", "original_file_path": "macros/materializations/materialized_view.sql", "unique_id": "macro.dbt_trino.trino__refresh_materialized_view", "macro_sql": "\n\n\n{%- macro trino__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": 1696597056.9355328, "supported_languages": null}, "macro.dbt_trino.trino__snapshot_hash_arguments": {"name": "trino__snapshot_hash_arguments", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "unique_id": "macro.dbt_trino.trino__snapshot_hash_arguments", "macro_sql": "{% macro trino__snapshot_hash_arguments(args) -%}\n lower(to_hex(md5(to_utf8(concat({%- for arg in args -%}\n coalesce(cast({{ arg }} as varchar), ''){% 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": 1696597056.93676, "supported_languages": null}, "macro.dbt_trino.trino__post_snapshot": {"name": "trino__post_snapshot", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "unique_id": "macro.dbt_trino.trino__post_snapshot", "macro_sql": "{% macro trino__post_snapshot(staging_relation) %}\n -- Clean up the snapshot temp table\n {% do drop_relation(staging_relation) %}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9370549, "supported_languages": null}, "macro.dbt_trino.trino__snapshot_merge_sql": {"name": "trino__snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/materializations/snapshot.sql", "original_file_path": "macros/materializations/snapshot.sql", "unique_id": "macro.dbt_trino.trino__snapshot_merge_sql", "macro_sql": "{% macro trino__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 ({% for insert_col in insert_cols -%}\n DBT_INTERNAL_SOURCE.{{ insert_col }}\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": 1696597056.9378242, "supported_languages": null}, "macro.dbt_trino.materialization_table_trino": {"name": "materialization_table_trino", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/materializations/table.sql", "original_file_path": "macros/materializations/table.sql", "unique_id": "macro.dbt_trino.materialization_table_trino", "macro_sql": "{% materialization table, adapter = 'trino' %}\n {%- set on_table_exists = config.get('on_table_exists', 'rename') -%}\n {% if on_table_exists not in ['rename', 'drop'] %}\n {%- set log_message = 'Invalid value for on_table_exists (%s) specified. Setting default value (%s).' % (on_table_exists, 'rename') -%}\n {% do log(log_message) %}\n {%- set on_table_exists = 'rename' -%}\n {% endif %}\n\n {%- set existing_relation = load_cached_relation(this) -%}\n {%- set target_relation = this.incorporate(type='table') %}\n\n {% if on_table_exists == 'rename' %}\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 {%- 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\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 {% endif %}\n\n {{ run_hooks(pre_hooks) }}\n\n -- grab current tables grants config for comparision later on\n {% set grant_config = config.get('grants') %}\n\n {% if on_table_exists == 'rename' %}\n {#-- build modeldock #}\n {% call statement('main') -%}\n {{ create_table_as(False, intermediate_relation, sql) }}\n {%- endcall %}\n\n {#-- cleanup #}\n {% if existing_relation is not none %}\n {{ adapter.rename_relation(existing_relation, backup_relation) }}\n {% endif %}\n\n {{ adapter.rename_relation(intermediate_relation, target_relation) }}\n\n {#-- finally, drop the existing/backup relation after the commit #}\n {{ drop_relation_if_exists(backup_relation) }}\n\n {% elif on_table_exists == 'drop' %}\n {#-- cleanup #}\n {%- if existing_relation is not none -%}\n {{ adapter.drop_relation(existing_relation) }}\n {%- endif -%}\n\n {#-- build model #}\n {% call statement('main') -%}\n {{ create_table_as(False, target_relation, sql) }}\n {%- endcall %}\n {% endif %}\n\n {% do persist_docs(target_relation, model) %}\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 {{ run_hooks(post_hooks) }}\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.create_table_as", "macro.dbt.persist_docs", "macro.dbt.should_revoke", "macro.dbt.apply_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9434626, "supported_languages": ["sql"]}, "macro.dbt_trino.materialization_view_trino": {"name": "materialization_view_trino", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/materializations/view.sql", "original_file_path": "macros/materializations/view.sql", "unique_id": "macro.dbt_trino.materialization_view_trino", "macro_sql": "{% materialization view, adapter='trino' -%}\n {% set to_return = create_or_replace_view() %}\n {% set target_relation = this.incorporate(type='view') %}\n\n {% do persist_docs(target_relation, model) %}\n\n {% do return(to_return) %}\n{%- endmaterialization %}", "depends_on": {"macros": ["macro.dbt_trino.create_or_replace_view", "macro.dbt.persist_docs"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9442892, "supported_languages": ["sql"]}, "macro.dbt_trino.trino__get_batch_size": {"name": "trino__get_batch_size", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt_trino.trino__get_batch_size", "macro_sql": "{% macro trino__get_batch_size() %}\n {{ return(1000) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9467342, "supported_languages": null}, "macro.dbt_trino.create_bindings": {"name": "create_bindings", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt_trino.create_bindings", "macro_sql": "{% macro create_bindings(row, types) %}\n {% set values = [] %}\n {% set re = modules.re %}\n\n {%- for item in row -%}\n {%- set type = types[loop.index0] -%}\n {%- set match_type = re.match(\"(\\w+)(\\(.*\\))?\", type) -%}\n {%- if item is not none and item is string and 'interval' in match_type.group(1) -%}\n {%- do values.append((none, match_type.group(1).upper() ~ \" \" ~ item)) -%}\n {%- elif item is not none and item is string and 'varchar' not in type.lower() -%}\n {%- do values.append((none, match_type.group(1).upper() ~ \" '\" ~ item ~ \"'\")) -%}\n {%- elif item is not none and 'varchar' in type.lower() -%}\n {%- do values.append((get_binding_char(), item|string())) -%}\n {%- else -%}\n {%- do values.append((get_binding_char(), item)) -%}\n {% endif -%}\n {%- endfor -%}\n {{ return(values) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9501386, "supported_languages": null}, "macro.dbt_trino.trino__load_csv_rows": {"name": "trino__load_csv_rows", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/materializations/seeds/helpers.sql", "original_file_path": "macros/materializations/seeds/helpers.sql", "unique_id": "macro.dbt_trino.trino__load_csv_rows", "macro_sql": "{% macro trino__load_csv_rows(model, agate_table) %}\n {% set column_override = model['config'].get('column_types', {}) %}\n {% set types = [] %}\n\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 {%- do types.append(type) -%}\n {%- endfor -%}\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 {% set sql %}\n insert into {{ this.render() }} ({{ cols_sql }}) values\n {% for row in chunk -%}\n ({%- for tuple in create_bindings(row, types) -%}\n {%- if tuple.0 is not none -%}\n {{ tuple.0 }}\n {%- do bindings.append(tuple.1) -%}\n {%- else -%}\n {{ tuple.1 }}\n {%- endif -%}\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_trino.create_bindings"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9535046, "supported_languages": null}, "macro.dbt_trino.trino__any_value": {"name": "trino__any_value", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/utils/any_value.sql", "original_file_path": "macros/utils/any_value.sql", "unique_id": "macro.dbt_trino.trino__any_value", "macro_sql": "{% macro trino__any_value(expression) -%}\n min({{ expression }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9538379, "supported_languages": null}, "macro.dbt_trino.trino__array_append": {"name": "trino__array_append", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/utils/array_append.sql", "original_file_path": "macros/utils/array_append.sql", "unique_id": "macro.dbt_trino.trino__array_append", "macro_sql": "{% macro trino__array_append(array, new_element) -%}\n {{ array_concat(array, array_construct([new_element])) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.array_concat", "macro.dbt.array_construct"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9542522, "supported_languages": null}, "macro.dbt_trino.trino__array_concat": {"name": "trino__array_concat", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/utils/array_concat.sql", "original_file_path": "macros/utils/array_concat.sql", "unique_id": "macro.dbt_trino.trino__array_concat", "macro_sql": "{% macro trino__array_concat(array_1, array_2) -%}\n concat({{ array_1 }}, {{ array_2 }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9545958, "supported_languages": null}, "macro.dbt_trino.trino__array_construct": {"name": "trino__array_construct", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/utils/array_construct.sql", "original_file_path": "macros/utils/array_construct.sql", "unique_id": "macro.dbt_trino.trino__array_construct", "macro_sql": "{% macro trino__array_construct(inputs, data_type) -%}\n {%- if not inputs -%}\n null\n {%- else -%}\n array[ {{ inputs|join(' , ') }} ]\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9551363, "supported_languages": null}, "macro.dbt_trino.trino__bool_or": {"name": "trino__bool_or", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/utils/bool_or.sql", "original_file_path": "macros/utils/bool_or.sql", "unique_id": "macro.dbt_trino.trino__bool_or", "macro_sql": "{% macro trino__bool_or(expression) -%}\n bool_or({{ expression }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9554214, "supported_languages": null}, "macro.dbt_trino.trino__type_float": {"name": "trino__type_float", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "unique_id": "macro.dbt_trino.trino__type_float", "macro_sql": "{% macro trino__type_float() -%}\n double\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9557252, "supported_languages": null}, "macro.dbt_trino.trino__type_string": {"name": "trino__type_string", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "unique_id": "macro.dbt_trino.trino__type_string", "macro_sql": "{% macro trino__type_string() -%}\n varchar\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9559014, "supported_languages": null}, "macro.dbt_trino.trino__type_numeric": {"name": "trino__type_numeric", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "unique_id": "macro.dbt_trino.trino__type_numeric", "macro_sql": "{% macro trino__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": 1696597056.956059, "supported_languages": null}, "macro.dbt_trino.trino__type_int": {"name": "trino__type_int", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/utils/datatypes.sql", "original_file_path": "macros/utils/datatypes.sql", "unique_id": "macro.dbt_trino.trino__type_int", "macro_sql": "\n\n{%- macro trino__type_int() -%}\n integer\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9562159, "supported_languages": null}, "macro.dbt_trino.trino__date_trunc": {"name": "trino__date_trunc", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/utils/date_trunc.sql", "original_file_path": "macros/utils/date_trunc.sql", "unique_id": "macro.dbt_trino.trino__date_trunc", "macro_sql": "{% macro trino__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": 1696597056.956552, "supported_languages": null}, "macro.dbt_trino.trino__dateadd": {"name": "trino__dateadd", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/utils/dateadd.sql", "original_file_path": "macros/utils/dateadd.sql", "unique_id": "macro.dbt_trino.trino__dateadd", "macro_sql": "{% macro trino__dateadd(datepart, interval, from_date_or_timestamp) -%}\n date_add('{{ datepart }}', {{ interval }}, {{ from_date_or_timestamp }})\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9569764, "supported_languages": null}, "macro.dbt_trino.trino__datediff": {"name": "trino__datediff", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/utils/datediff.sql", "original_file_path": "macros/utils/datediff.sql", "unique_id": "macro.dbt_trino.trino__datediff", "macro_sql": "{% macro trino__datediff(first_date, second_date, datepart) -%}\n {%- if datepart == 'year' -%}\n (year(CAST({{ second_date }} AS TIMESTAMP)) - year(CAST({{ first_date }} AS TIMESTAMP)))\n {%- elif datepart == 'quarter' -%}\n ({{ datediff(first_date, second_date, 'year') }} * 4) + quarter(CAST({{ second_date }} AS TIMESTAMP)) - quarter(CAST({{ first_date }} AS TIMESTAMP))\n {%- elif datepart == 'month' -%}\n ({{ datediff(first_date, second_date, 'year') }} * 12) + month(CAST({{ second_date }} AS TIMESTAMP)) - month(CAST({{ first_date }} AS TIMESTAMP))\n {%- elif datepart == 'day' -%}\n ((to_milliseconds((CAST(CAST({{ second_date }} AS TIMESTAMP) AS DATE) - CAST(CAST({{ first_date }} AS TIMESTAMP) AS DATE)))) / 86400000)\n {%- elif datepart == 'week' -%}\n ({{ datediff(first_date, second_date, 'day') }} / 7 + case\n when dow(CAST({{first_date}} AS TIMESTAMP)) <= dow(CAST({{second_date}} AS 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 + hour(CAST({{ second_date }} AS TIMESTAMP)) - hour(CAST({{ first_date }} AS TIMESTAMP)))\n {%- elif datepart == 'minute' -%}\n ({{ datediff(first_date, second_date, 'hour') }} * 60 + minute(CAST({{ second_date }} AS TIMESTAMP)) - minute(CAST({{ first_date }} AS TIMESTAMP)))\n {%- elif datepart == 'second' -%}\n ({{ datediff(first_date, second_date, 'minute') }} * 60 + second(CAST({{ second_date }} AS TIMESTAMP)) - second(CAST({{ first_date }} AS TIMESTAMP)))\n {%- elif datepart == 'millisecond' -%}\n (to_milliseconds((CAST({{ second_date }} AS TIMESTAMP) - CAST({{ first_date }} AS TIMESTAMP))))\n {%- else -%}\n {% if execute %}{{ exceptions.raise_compiler_error(\"Unsupported datepart for macro datediff in Trino: {!r}\".format(datepart)) }}{% endif %}\n {%- endif -%}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9617746, "supported_languages": null}, "macro.dbt_trino.trino__hash": {"name": "trino__hash", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/utils/hash.sql", "original_file_path": "macros/utils/hash.sql", "unique_id": "macro.dbt_trino.trino__hash", "macro_sql": "{% macro trino__hash(field) -%}\n lower(to_hex(md5(to_utf8(cast({{field}} as varchar)))))\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9621053, "supported_languages": null}, "macro.dbt_trino.trino__listagg": {"name": "trino__listagg", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/utils/listagg.sql", "original_file_path": "macros/utils/listagg.sql", "unique_id": "macro.dbt_trino.trino__listagg", "macro_sql": "{% macro trino__listagg(measure, delimiter_text, order_by_clause, limit_num) -%}\n {% set collect_list %} array_agg({{ measure }} {% if order_by_clause -%}{{ order_by_clause }}{%- endif %}) {% endset %}\n {% set limited %} slice({{ collect_list }}, 1, {{ limit_num }}) {% endset %}\n {% set collected = limited if limit_num else collect_list %}\n {% set final %} array_join({{ collected }}, {{ delimiter_text }}) {% endset %}\n {% do return(final) %}\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9634416, "supported_languages": null}, "macro.dbt_trino.trino__right": {"name": "trino__right", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/utils/right.sql", "original_file_path": "macros/utils/right.sql", "unique_id": "macro.dbt_trino.trino__right", "macro_sql": "{% macro trino__right(string_text, length_expression) %}\n case when {{ length_expression }} = 0\n then ''\n else\n substr({{ string_text }}, -1 * ({{ length_expression }}))\n end\n{%- endmacro -%}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9638968, "supported_languages": null}, "macro.dbt_trino.trino__safe_cast": {"name": "trino__safe_cast", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/utils/safe_cast.sql", "original_file_path": "macros/utils/safe_cast.sql", "unique_id": "macro.dbt_trino.trino__safe_cast", "macro_sql": "{% macro trino__safe_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": 1696597056.964237, "supported_languages": null}, "macro.dbt_trino.trino__split_part": {"name": "trino__split_part", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/utils/split_part.sql", "original_file_path": "macros/utils/split_part.sql", "unique_id": "macro.dbt_trino.trino__split_part", "macro_sql": "{% macro trino__split_part(string_text, delimiter_text, part_number) %}\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{% 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": 1696597056.9650352, "supported_languages": null}, "macro.dbt_trino.trino__current_timestamp": {"name": "trino__current_timestamp", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/utils/timestamps.sql", "original_file_path": "macros/utils/timestamps.sql", "unique_id": "macro.dbt_trino.trino__current_timestamp", "macro_sql": "{% macro trino__current_timestamp() -%}\n current_timestamp\n{%- endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.965335, "supported_languages": null}, "macro.dbt_trino.trino__snapshot_string_as_time": {"name": "trino__snapshot_string_as_time", "resource_type": "macro", "package_name": "dbt_trino", "path": "macros/utils/timestamps.sql", "original_file_path": "macros/utils/timestamps.sql", "unique_id": "macro.dbt_trino.trino__snapshot_string_as_time", "macro_sql": "{% macro trino__snapshot_string_as_time(timestamp) %}\n {%- set result = \"timestamp '\" ~ timestamp ~ \"'\" -%}\n {{ return(result) }}\n{% endmacro %}", "depends_on": {"macros": []}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9656985, "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_trino.trino__copy_grants"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9685116, "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": 1696597056.9687593, "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_trino.trino__support_multiple_grantees_per_dcl_statement"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9692285, "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": 1696597056.9694662, "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": 1696597056.9701507, "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_trino.trino__get_show_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9705238, "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": 1696597056.9707415, "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_trino.trino__get_grant_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9712045, "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": 1696597056.9715838, "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": 1696597056.9720407, "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": 1696597056.9724207, "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": 1696597056.972876, "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": 1696597056.9741745, "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_trino.trino__call_dcl_statements"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9745595, "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": 1696597056.9750702, "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": 1696597056.975526, "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": 1696597056.977694, "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_trino.trino__get_columns_in_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9812458, "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": 1696597056.9815671, "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": 1696597056.9821832, "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": 1696597056.982613, "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": 1696597056.9830399, "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": 1696597056.983405, "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": 1696597056.984995, "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": 1696597056.9856725, "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": 1696597056.9860547, "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": 1696597056.9867303, "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_trino.trino__alter_column_type"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9872015, "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": 1696597056.9883504, "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_trino.trino__alter_relation_add_remove_columns"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9888608, "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": 1696597056.990369, "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_trino.trino__drop_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9919467, "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": 1696597056.9928377, "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": 1696597056.9932048, "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": 1696597056.9934218, "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": 1696597056.993765, "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": 1696597056.9939992, "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": 1696597056.994348, "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": 1696597056.9945662, "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": 1696597056.9953625, "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": 1696597056.9961793, "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.default__get_create_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9976377, "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": 1696597056.997937, "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": 1696597056.9982567, "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": 1696597056.999057, "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.default__get_drop_index_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597056.9994333, "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": 1696597056.9997091, "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.default__get_show_indexes_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.000037, "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": 1696597057.0002947, "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_trino.trino__get_catalog"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.0029113, "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": 1696597057.0034292, "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_trino.trino__information_schema_name"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.003812, "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": 1696597057.0041358, "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_trino.trino__list_schemas"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.0044897, "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": 1696597057.0049937, "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_trino.trino__check_schema_exists"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.0053973, "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": 1696597057.0060043, "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_trino.trino__list_relations_without_caching"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.006382, "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": 1696597057.0067115, "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_trino.trino__alter_column_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.0079358, "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": 1696597057.0082812, "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_trino.trino__alter_relation_comment"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.008679, "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": 1696597057.009034, "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": 1696597057.0095527, "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": 1696597057.0104795, "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.default__make_intermediate_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.0148706, "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": 1696597057.015208, "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.default__make_temp_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.015639, "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": 1696597057.0162184, "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.default__make_backup_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.0166917, "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": 1696597057.017445, "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": 1696597057.0178323, "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": 1696597057.0181649, "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_trino.trino__rename_relation"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.0185585, "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": 1696597057.0191343, "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": 1696597057.0196204, "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": 1696597057.0206883, "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": 1696597057.0211627, "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": 1696597057.0214584, "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": 1696597057.0218618, "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.default__create_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.0225713, "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": 1696597057.022965, "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_trino.trino__drop_schema"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.0232944, "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": 1696597057.0236614, "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": 1696597057.0246384, "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": 1696597057.0250285, "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": 1696597057.025307, "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_trino.trino__current_timestamp"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.0261917, "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": 1696597057.026495, "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.default__snapshot_get_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.0267797, "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": 1696597057.027031, "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.default__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.0273616, "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": 1696597057.0275266, "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.default__current_timestamp_in_utc_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.0278745, "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.default__current_timestamp_backcompat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.0283654, "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": 1696597057.02898, "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": 1696597057.0294619, "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": 1696597057.0326571, "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": 1696597057.0349445, "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": 1696597057.0364025, "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": 1696597057.036884, "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": 1696597057.03958, "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": 1696597057.0407045, "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": 1696597057.0413003, "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": 1696597057.042392, "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": 1696597057.0430062, "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": 1696597057.043653, "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": 1696597057.0441492, "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": 1696597057.0449252, "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": 1696597057.0456607, "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": 1696597057.0464165, "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": 1696597057.0469403, "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": 1696597057.0478814, "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": 1696597057.0484054, "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": 1696597057.0489764, "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": 1696597057.049668, "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": 1696597057.0506642, "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": 1696597057.0512893, "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": 1696597057.053247, "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": 1696597057.053636, "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": 1696597057.0539463, "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": 1696597057.0542393, "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": 1696597057.054533, "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": 1696597057.055022, "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": 1696597057.0552695, "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": 1696597057.0608213, "supported_languages": ["sql"]}, "macro.dbt.create_or_replace_clone": {"name": "create_or_replace_clone", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/models/clone/create_or_replace_clone.sql", "original_file_path": "macros/materializations/models/clone/create_or_replace_clone.sql", "unique_id": "macro.dbt.create_or_replace_clone", "macro_sql": "{% macro create_or_replace_clone(this_relation, defer_relation) %}\n {{ return(adapter.dispatch('create_or_replace_clone', 'dbt')(this_relation, defer_relation)) }}\n{% endmacro %}", "depends_on": {"macros": ["macro.dbt.default__create_or_replace_clone"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.0614288, "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": 1696597057.0617056, "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": 1696597057.064393, "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": 1696597057.065472, "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": 1696597057.066754, "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": 1696597057.0672445, "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": 1696597057.0686438, "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": 1696597057.0775676, "supported_languages": ["sql"]}, "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": 1696597057.0787666, "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_trino.trino__get_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.0875747, "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": 1696597057.0905654, "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_trino.trino__get_delete_insert_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.0910985, "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": 1696597057.093031, "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": 1696597057.0935578, "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": 1696597057.0948257, "supported_languages": null}, "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": 1696597057.1031396, "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": 1696597057.105499, "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": 1696597057.107924, "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": 1696597057.1095612, "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": 1696597057.1111236, "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": 1696597057.1115794, "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": 1696597057.1119623, "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": 1696597057.1125288, "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": 1696597057.1129172, "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": 1696597057.113491, "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": 1696597057.1138804, "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": 1696597057.1143973, "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.default__get_incremental_default_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.1147683, "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": 1696597057.115106, "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": 1696597057.115651, "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.default__get_alter_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.1165674, "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": 1696597057.1169581, "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_trino.trino__get_create_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.1176052, "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": 1696597057.1179168, "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_trino.trino__get_materialized_view_configuration_changes"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.1187022, "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": 1696597057.1190317, "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": 1696597057.1269214, "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": 1696597057.1276774, "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": 1696597057.1281824, "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": 1696597057.1306324, "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": 1696597057.1311183, "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": 1696597057.132395, "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_trino.trino__refresh_materialized_view"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.1330252, "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": 1696597057.1333067, "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_trino.trino__get_replace_materialized_view_as_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.1341107, "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": 1696597057.1344616, "supported_languages": null}, "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": 1696597057.136201, "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": 1696597057.1364493, "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": 1696597057.137481, "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": 1696597057.1378353, "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": 1696597057.138113, "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": 1696597057.1405292, "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": 1696597057.1412954, "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": 1696597057.141966, "supported_languages": null}, "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": 1696597057.14346, "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": 1696597057.1438413, "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_trino.trino__create_table_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.1446738, "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": 1696597057.1461177, "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": 1696597057.1470234, "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": 1696597057.147397, "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": 1696597057.1477494, "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": 1696597057.152777, "supported_languages": ["sql"]}, "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": 1696597057.1555889, "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": 1696597057.156391, "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": 1696597057.1567192, "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_trino.trino__create_view_as"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.1570961, "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": 1696597057.1579218, "supported_languages": null}, "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": 1696597057.1584926, "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": 1696597057.1589503, "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": 1696597057.164033, "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_trino.trino__create_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.1714513, "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": 1696597057.173166, "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_trino.trino__reset_csv_table"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.1736276, "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": 1696597057.1745672, "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": 1696597057.1749787, "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": 1696597057.1752565, "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_trino.trino__get_binding_char"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.175543, "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": 1696597057.1757853, "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_trino.trino__get_batch_size"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.176124, "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": 1696597057.1763682, "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": 1696597057.1774426, "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_trino.trino__load_csv_rows"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.17783, "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": 1696597057.180135, "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": 1696597057.185831, "supported_languages": ["sql"]}, "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": 1696597057.1917584, "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": 1696597057.1923301, "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_trino.trino__post_snapshot"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.1926656, "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": 1696597057.1928692, "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": 1696597057.1931624, "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": 1696597057.1934044, "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": 1696597057.1938128, "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": 1696597057.1954913, "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": 1696597057.1958916, "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": 1696597057.1963959, "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": 1696597057.1972365, "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": 1696597057.207294, "supported_languages": ["sql"]}, "macro.dbt.snapshot_merge_sql": {"name": "snapshot_merge_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/snapshots/snapshot_merge.sql", "original_file_path": "macros/materializations/snapshots/snapshot_merge.sql", "unique_id": "macro.dbt.snapshot_merge_sql", "macro_sql": "{% macro snapshot_merge_sql(target, source, insert_cols) -%}\n {{ adapter.dispatch('snapshot_merge_sql', 'dbt')(target, source, insert_cols) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt_trino.trino__snapshot_merge_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.2081325, "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": 1696597057.2086568, "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": 1696597057.214409, "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_trino.trino__snapshot_hash_arguments"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.2147512, "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": 1696597057.2152138, "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": 1696597057.216569, "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_trino.trino__snapshot_string_as_time"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.2169218, "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": 1696597057.2172718, "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": 1696597057.219936, "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": 1696597057.222485, "supported_languages": null}, "macro.dbt.get_test_sql": {"name": "get_test_sql", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/helpers.sql", "original_file_path": "macros/materializations/tests/helpers.sql", "unique_id": "macro.dbt.get_test_sql", "macro_sql": "{% macro get_test_sql(main_sql, fail_calc, warn_if, error_if, limit) -%}\n {{ adapter.dispatch('get_test_sql', 'dbt')(main_sql, fail_calc, warn_if, error_if, limit) }}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_test_sql"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.2233188, "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": 1696597057.2239199, "supported_languages": null}, "macro.dbt.materialization_test_default": {"name": "materialization_test_default", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/test.sql", "original_file_path": "macros/materializations/tests/test.sql", "unique_id": "macro.dbt.materialization_test_default", "macro_sql": "{%- materialization test, default -%}\n\n {% set relations = [] %}\n\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": 1696597057.2275436, "supported_languages": ["sql"]}, "macro.dbt.get_where_subquery": {"name": "get_where_subquery", "resource_type": "macro", "package_name": "dbt", "path": "macros/materializations/tests/where_subquery.sql", "original_file_path": "macros/materializations/tests/where_subquery.sql", "unique_id": "macro.dbt.get_where_subquery", "macro_sql": "{% macro get_where_subquery(relation) -%}\n {% do return(adapter.dispatch('get_where_subquery', 'dbt')(relation)) %}\n{%- endmacro %}", "depends_on": {"macros": ["macro.dbt.default__get_where_subquery"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.2282724, "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": 1696597057.2290175, "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": 1696597057.2316296, "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": 1696597057.2319508, "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": 1696597057.2334795, "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": 1696597057.2342815, "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": 1696597057.2354083, "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": 1696597057.236327, "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": 1696597057.236496, "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_trino.trino__any_value"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.2370071, "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": 1696597057.2372296, "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_trino.trino__array_append"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.2377694, "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": 1696597057.2380617, "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_trino.trino__array_concat"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.2386036, "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": 1696597057.238907, "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_trino.trino__array_construct"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.2396255, "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": 1696597057.2401273, "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_trino.trino__bool_or"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.2406259, "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": 1696597057.240862, "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": 1696597057.2414734, "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": 1696597057.241794, "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": 1696597057.2422898, "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": 1696597057.2425406, "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_trino.trino__type_string"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.24418, "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": 1696597057.2444847, "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": 1696597057.2448206, "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": 1696597057.2451315, "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_trino.trino__type_float"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.2454526, "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": 1696597057.245754, "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_trino.trino__type_numeric"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.246094, "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": 1696597057.2464428, "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": 1696597057.246763, "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": 1696597057.2470942, "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_trino.trino__type_int"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.2474287, "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": 1696597057.2477248, "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": 1696597057.2480614, "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": 1696597057.2483542, "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_trino.trino__date_trunc"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.2489038, "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": 1696597057.2491758, "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_trino.trino__dateadd"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.249825, "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": 1696597057.2501676, "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_trino.trino__datediff"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.2508216, "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": 1696597057.2512932, "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": 1696597057.251832, "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": 1696597057.2521164, "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": 1696597057.2525547, "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": 1696597057.2527237, "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_trino.trino__hash"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.2532399, "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": 1696597057.2535586, "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": 1696597057.2540228, "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": 1696597057.2541933, "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.default__last_day"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.254858, "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": 1696597057.2553751, "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": 1696597057.255673, "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": 1696597057.2561924, "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": 1696597057.2564178, "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_trino.trino__listagg"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.2575078, "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": 1696597057.2583153, "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": 1696597057.258823, "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": 1696597057.2590501, "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": 1696597057.259607, "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": 1696597057.2599132, "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": 1696597057.2605386, "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": 1696597057.2609, "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_trino.trino__right"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.2615826, "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": 1696597057.2618892, "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_trino.trino__safe_cast"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.2624366, "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": 1696597057.2627168, "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_trino.trino__split_part"]}, "description": "", "meta": {}, "docs": {"show": true, "node_color": null}, "patch_path": null, "arguments": [], "created_at": 1696597057.2636292, "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": 1696597057.2639816, "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": 1696597057.2644162, "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": 1696597057.265341, "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": 1696597057.2658136, "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": 1696597057.2663722, "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": 1696597057.2669256, "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": {"model.wri_gppd_transform.gppd_power_plants_list": [], "test.wri_gppd_transform.unique_gppd_power_plants_list_gppd_idnr.85ac978899": ["model.wri_gppd_transform.gppd_power_plants_list"], "test.wri_gppd_transform.not_null_gppd_power_plants_list_gppd_idnr.bb278f73bc": ["model.wri_gppd_transform.gppd_power_plants_list"], "test.wri_gppd_transform.unique_gppd_power_plants_list_name.37c2d0f477": ["model.wri_gppd_transform.gppd_power_plants_list"], "test.wri_gppd_transform.not_null_gppd_power_plants_list_name.a415d9e2a5": ["model.wri_gppd_transform.gppd_power_plants_list"], "test.wri_gppd_transform.not_null_gppd_power_plants_list_country.0d2e3aed2c": ["model.wri_gppd_transform.gppd_power_plants_list"], "test.wri_gppd_transform.not_null_gppd_power_plants_list_country_long.d394df506e": ["model.wri_gppd_transform.gppd_power_plants_list"], "test.wri_gppd_transform.not_null_gppd_power_plants_list_latitude.5cadb5eb49": ["model.wri_gppd_transform.gppd_power_plants_list"], "test.wri_gppd_transform.not_null_gppd_power_plants_list_longitude.b9a294aa23": ["model.wri_gppd_transform.gppd_power_plants_list"], "test.wri_gppd_transform.not_null_gppd_power_plants_list_capacity_mw.9f7ae55ef0": ["model.wri_gppd_transform.gppd_power_plants_list"], "test.wri_gppd_transform.not_null_gppd_power_plants_list_year_of_capacity_data.1a3165a676": ["model.wri_gppd_transform.gppd_power_plants_list"]}, "child_map": {"model.wri_gppd_transform.gppd_power_plants_list": ["test.wri_gppd_transform.not_null_gppd_power_plants_list_capacity_mw.9f7ae55ef0", "test.wri_gppd_transform.not_null_gppd_power_plants_list_country.0d2e3aed2c", "test.wri_gppd_transform.not_null_gppd_power_plants_list_country_long.d394df506e", "test.wri_gppd_transform.not_null_gppd_power_plants_list_gppd_idnr.bb278f73bc", "test.wri_gppd_transform.not_null_gppd_power_plants_list_latitude.5cadb5eb49", "test.wri_gppd_transform.not_null_gppd_power_plants_list_longitude.b9a294aa23", "test.wri_gppd_transform.not_null_gppd_power_plants_list_name.a415d9e2a5", "test.wri_gppd_transform.not_null_gppd_power_plants_list_year_of_capacity_data.1a3165a676", "test.wri_gppd_transform.unique_gppd_power_plants_list_gppd_idnr.85ac978899", "test.wri_gppd_transform.unique_gppd_power_plants_list_name.37c2d0f477"], "test.wri_gppd_transform.unique_gppd_power_plants_list_gppd_idnr.85ac978899": [], "test.wri_gppd_transform.not_null_gppd_power_plants_list_gppd_idnr.bb278f73bc": [], "test.wri_gppd_transform.unique_gppd_power_plants_list_name.37c2d0f477": [], "test.wri_gppd_transform.not_null_gppd_power_plants_list_name.a415d9e2a5": [], "test.wri_gppd_transform.not_null_gppd_power_plants_list_country.0d2e3aed2c": [], "test.wri_gppd_transform.not_null_gppd_power_plants_list_country_long.d394df506e": [], "test.wri_gppd_transform.not_null_gppd_power_plants_list_latitude.5cadb5eb49": [], "test.wri_gppd_transform.not_null_gppd_power_plants_list_longitude.b9a294aa23": [], "test.wri_gppd_transform.not_null_gppd_power_plants_list_capacity_mw.9f7ae55ef0": [], "test.wri_gppd_transform.not_null_gppd_power_plants_list_year_of_capacity_data.1a3165a676": []}, "group_map": {}, "semantic_models": {}} \ No newline at end of file diff --git a/dbt/wri_gppd_transform/target/run_results.json b/dbt/wri_gppd_transform/target/run_results.json index 5475d64..1fcdb0b 100644 --- a/dbt/wri_gppd_transform/target/run_results.json +++ b/dbt/wri_gppd_transform/target/run_results.json @@ -1 +1 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/run-results/v4.json", "dbt_version": "1.2.1", "generated_at": "2022-10-02T07:51:53.090772Z", "invocation_id": "a4a4caaf-d5d9-4458-9c47-9f082e1d81d1", "env": {}}, "results": [{"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-02T07:51:52.705966Z", "completed_at": "2022-10-02T07:51:52.709038Z"}, {"name": "execute", "started_at": "2022-10-02T07:51:52.709568Z", "completed_at": "2022-10-02T07:51:52.709587Z"}], "thread_id": "Thread-1", "execution_time": 0.0046100616455078125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "model.wri_gppd_transform.gppd_power_plants_list"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-02T07:51:52.777213Z", "completed_at": "2022-10-02T07:51:52.789303Z"}, {"name": "execute", "started_at": "2022-10-02T07:51:52.789782Z", "completed_at": "2022-10-02T07:51:52.789792Z"}], "thread_id": "Thread-1", "execution_time": 0.013504743576049805, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_capacity_mw.9f7ae55ef0"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-02T07:51:52.791442Z", "completed_at": "2022-10-02T07:51:52.795474Z"}, {"name": "execute", "started_at": "2022-10-02T07:51:52.795948Z", "completed_at": "2022-10-02T07:51:52.795957Z"}], "thread_id": "Thread-1", "execution_time": 0.005475521087646484, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_country.0d2e3aed2c"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-02T07:51:52.797548Z", "completed_at": "2022-10-02T07:51:52.879725Z"}, {"name": "execute", "started_at": "2022-10-02T07:51:52.880284Z", "completed_at": "2022-10-02T07:51:52.880293Z"}], "thread_id": "Thread-1", "execution_time": 0.08368682861328125, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_country_long.d394df506e"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-02T07:51:52.881890Z", "completed_at": "2022-10-02T07:51:52.887199Z"}, {"name": "execute", "started_at": "2022-10-02T07:51:52.887690Z", "completed_at": "2022-10-02T07:51:52.887698Z"}], "thread_id": "Thread-1", "execution_time": 0.0067234039306640625, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_gppd_idnr.bb278f73bc"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-02T07:51:52.889326Z", "completed_at": "2022-10-02T07:51:52.893312Z"}, {"name": "execute", "started_at": "2022-10-02T07:51:52.893781Z", "completed_at": "2022-10-02T07:51:52.893788Z"}], "thread_id": "Thread-1", "execution_time": 0.005389213562011719, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_latitude.5cadb5eb49"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-02T07:51:52.895340Z", "completed_at": "2022-10-02T07:51:52.979574Z"}, {"name": "execute", "started_at": "2022-10-02T07:51:52.980044Z", "completed_at": "2022-10-02T07:51:52.980052Z"}], "thread_id": "Thread-1", "execution_time": 0.08566117286682129, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_longitude.b9a294aa23"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-02T07:51:52.981649Z", "completed_at": "2022-10-02T07:51:52.985682Z"}, {"name": "execute", "started_at": "2022-10-02T07:51:52.986157Z", "completed_at": "2022-10-02T07:51:52.986165Z"}], "thread_id": "Thread-1", "execution_time": 0.005461454391479492, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_name.a415d9e2a5"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-02T07:51:52.987751Z", "completed_at": "2022-10-02T07:51:52.991711Z"}, {"name": "execute", "started_at": "2022-10-02T07:51:52.992185Z", "completed_at": "2022-10-02T07:51:52.992192Z"}], "thread_id": "Thread-1", "execution_time": 0.005385637283325195, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_year_of_capacity_data.1a3165a676"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-02T07:51:52.993754Z", "completed_at": "2022-10-02T07:51:53.082039Z"}, {"name": "execute", "started_at": "2022-10-02T07:51:53.082544Z", "completed_at": "2022-10-02T07:51:53.082551Z"}], "thread_id": "Thread-1", "execution_time": 0.08973145484924316, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.wri_gppd_transform.unique_gppd_power_plants_list_gppd_idnr.85ac978899"}, {"status": "success", "timing": [{"name": "compile", "started_at": "2022-10-02T07:51:53.084124Z", "completed_at": "2022-10-02T07:51:53.088289Z"}, {"name": "execute", "started_at": "2022-10-02T07:51:53.088760Z", "completed_at": "2022-10-02T07:51:53.088768Z"}], "thread_id": "Thread-1", "execution_time": 0.005545377731323242, "adapter_response": {}, "message": null, "failures": null, "unique_id": "test.wri_gppd_transform.unique_gppd_power_plants_list_name.37c2d0f477"}], "elapsed_time": 0.686378002166748, "args": {"write_json": true, "use_colors": true, "printer_width": 80, "version_check": true, "partial_parse": true, "static_parser": true, "profiles_dir": "/opt/app-root/src", "send_anonymous_usage_stats": true, "event_buffer_size": 100000, "quiet": false, "no_print": false, "compile": true, "which": "generate", "rpc_method": "docs.generate", "indirect_selection": "eager"}} \ No newline at end of file +{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/run-results/v4.json", "dbt_version": "1.6.5", "generated_at": "2023-10-06T12:57:58.992079Z", "invocation_id": "4aac4fa9-86e6-4cd4-ba70-d02d18c66aeb", "env": {}}, "results": [{"status": "pass", "timing": [{"name": "compile", "started_at": "2023-10-06T12:57:52.318049Z", "completed_at": "2023-10-06T12:57:52.331527Z"}, {"name": "execute", "started_at": "2023-10-06T12:57:52.332912Z", "completed_at": "2023-10-06T12:57:52.850563Z"}], "thread_id": "Thread-1", "execution_time": 0.5373210906982422, "adapter_response": {"_message": "SUCCESS", "rows_affected": -1, "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"1.6.5\", \"profile_name\": \"wri_gppd_transform\", \"target_name\": \"dev\", \"node_id\": \"test.wri_gppd_transform.not_null_gppd_power_plants_list_capacity_mw.9f7ae55ef0\"} */\nselect\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n\n\n\nselect capacity_mw\nfrom osc_datacommons_dev.wri_gppd.gppd_power_plants_list\nwhere capacity_mw is null\n\n\n\n \n ) dbt_internal_test", "query_id": "20231006_125753_00228_nybvj"}, "message": null, "failures": 0, "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_capacity_mw.9f7ae55ef0"}, {"status": "pass", "timing": [{"name": "compile", "started_at": "2023-10-06T12:57:52.858547Z", "completed_at": "2023-10-06T12:57:52.863973Z"}, {"name": "execute", "started_at": "2023-10-06T12:57:52.865309Z", "completed_at": "2023-10-06T12:57:53.087537Z"}], "thread_id": "Thread-1", "execution_time": 0.23389935493469238, "adapter_response": {"_message": "SUCCESS", "rows_affected": -1, "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"1.6.5\", \"profile_name\": \"wri_gppd_transform\", \"target_name\": \"dev\", \"node_id\": \"test.wri_gppd_transform.not_null_gppd_power_plants_list_country.0d2e3aed2c\"} */\nselect\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n\n\n\nselect country\nfrom osc_datacommons_dev.wri_gppd.gppd_power_plants_list\nwhere country is null\n\n\n\n \n ) dbt_internal_test", "query_id": "20231006_125753_00229_nybvj"}, "message": null, "failures": 0, "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_country.0d2e3aed2c"}, {"status": "pass", "timing": [{"name": "compile", "started_at": "2023-10-06T12:57:53.095660Z", "completed_at": "2023-10-06T12:57:53.101261Z"}, {"name": "execute", "started_at": "2023-10-06T12:57:53.102607Z", "completed_at": "2023-10-06T12:57:53.437868Z"}], "thread_id": "Thread-1", "execution_time": 0.3472111225128174, "adapter_response": {"_message": "SUCCESS", "rows_affected": -1, "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"1.6.5\", \"profile_name\": \"wri_gppd_transform\", \"target_name\": \"dev\", \"node_id\": \"test.wri_gppd_transform.not_null_gppd_power_plants_list_country_long.d394df506e\"} */\nselect\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n\n\n\nselect country_long\nfrom osc_datacommons_dev.wri_gppd.gppd_power_plants_list\nwhere country_long is null\n\n\n\n \n ) dbt_internal_test", "query_id": "20231006_125753_00230_nybvj"}, "message": null, "failures": 0, "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_country_long.d394df506e"}, {"status": "pass", "timing": [{"name": "compile", "started_at": "2023-10-06T12:57:53.445990Z", "completed_at": "2023-10-06T12:57:53.451663Z"}, {"name": "execute", "started_at": "2023-10-06T12:57:53.453028Z", "completed_at": "2023-10-06T12:57:53.728656Z"}], "thread_id": "Thread-1", "execution_time": 0.2876291275024414, "adapter_response": {"_message": "SUCCESS", "rows_affected": -1, "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"1.6.5\", \"profile_name\": \"wri_gppd_transform\", \"target_name\": \"dev\", \"node_id\": \"test.wri_gppd_transform.not_null_gppd_power_plants_list_gppd_idnr.bb278f73bc\"} */\nselect\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n\n\n\nselect gppd_idnr\nfrom osc_datacommons_dev.wri_gppd.gppd_power_plants_list\nwhere gppd_idnr is null\n\n\n\n \n ) dbt_internal_test", "query_id": "20231006_125754_00231_nybvj"}, "message": null, "failures": 0, "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_gppd_idnr.bb278f73bc"}, {"status": "pass", "timing": [{"name": "compile", "started_at": "2023-10-06T12:57:53.736728Z", "completed_at": "2023-10-06T12:57:53.742536Z"}, {"name": "execute", "started_at": "2023-10-06T12:57:53.743896Z", "completed_at": "2023-10-06T12:57:53.983983Z"}], "thread_id": "Thread-1", "execution_time": 0.25216031074523926, "adapter_response": {"_message": "SUCCESS", "rows_affected": -1, "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"1.6.5\", \"profile_name\": \"wri_gppd_transform\", \"target_name\": \"dev\", \"node_id\": \"test.wri_gppd_transform.not_null_gppd_power_plants_list_latitude.5cadb5eb49\"} */\nselect\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n\n\n\nselect latitude\nfrom osc_datacommons_dev.wri_gppd.gppd_power_plants_list\nwhere latitude is null\n\n\n\n \n ) dbt_internal_test", "query_id": "20231006_125754_00232_nybvj"}, "message": null, "failures": 0, "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_latitude.5cadb5eb49"}, {"status": "pass", "timing": [{"name": "compile", "started_at": "2023-10-06T12:57:53.991969Z", "completed_at": "2023-10-06T12:57:53.997629Z"}, {"name": "execute", "started_at": "2023-10-06T12:57:53.999003Z", "completed_at": "2023-10-06T12:57:54.254579Z"}], "thread_id": "Thread-1", "execution_time": 0.2675957679748535, "adapter_response": {"_message": "SUCCESS", "rows_affected": -1, "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"1.6.5\", \"profile_name\": \"wri_gppd_transform\", \"target_name\": \"dev\", \"node_id\": \"test.wri_gppd_transform.not_null_gppd_power_plants_list_longitude.b9a294aa23\"} */\nselect\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n\n\n\nselect longitude\nfrom osc_datacommons_dev.wri_gppd.gppd_power_plants_list\nwhere longitude is null\n\n\n\n \n ) dbt_internal_test", "query_id": "20231006_125754_00233_nybvj"}, "message": null, "failures": 0, "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_longitude.b9a294aa23"}, {"status": "pass", "timing": [{"name": "compile", "started_at": "2023-10-06T12:57:54.262680Z", "completed_at": "2023-10-06T12:57:54.268321Z"}, {"name": "execute", "started_at": "2023-10-06T12:57:54.269656Z", "completed_at": "2023-10-06T12:57:54.569945Z"}], "thread_id": "Thread-1", "execution_time": 0.31217026710510254, "adapter_response": {"_message": "SUCCESS", "rows_affected": -1, "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"1.6.5\", \"profile_name\": \"wri_gppd_transform\", \"target_name\": \"dev\", \"node_id\": \"test.wri_gppd_transform.not_null_gppd_power_plants_list_name.a415d9e2a5\"} */\nselect\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n\n\n\nselect name\nfrom osc_datacommons_dev.wri_gppd.gppd_power_plants_list\nwhere name is null\n\n\n\n \n ) dbt_internal_test", "query_id": "20231006_125755_00234_nybvj"}, "message": null, "failures": 0, "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_name.a415d9e2a5"}, {"status": "fail", "timing": [{"name": "compile", "started_at": "2023-10-06T12:57:54.577992Z", "completed_at": "2023-10-06T12:57:54.583478Z"}, {"name": "execute", "started_at": "2023-10-06T12:57:54.584828Z", "completed_at": "2023-10-06T12:57:56.461163Z"}], "thread_id": "Thread-1", "execution_time": 1.8881170749664307, "adapter_response": {"_message": "SUCCESS", "rows_affected": -1, "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"1.6.5\", \"profile_name\": \"wri_gppd_transform\", \"target_name\": \"dev\", \"node_id\": \"test.wri_gppd_transform.not_null_gppd_power_plants_list_year_of_capacity_data.1a3165a676\"} */\nselect\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n\n\n\nselect year_of_capacity_data\nfrom osc_datacommons_dev.wri_gppd.gppd_power_plants_list\nwhere year_of_capacity_data is null\n\n\n\n \n ) dbt_internal_test", "query_id": "20231006_125755_00235_nybvj"}, "message": "Got 20049 results, configured to fail if != 0", "failures": 20049, "unique_id": "test.wri_gppd_transform.not_null_gppd_power_plants_list_year_of_capacity_data.1a3165a676"}, {"status": "pass", "timing": [{"name": "compile", "started_at": "2023-10-06T12:57:56.469263Z", "completed_at": "2023-10-06T12:57:56.477144Z"}, {"name": "execute", "started_at": "2023-10-06T12:57:56.478488Z", "completed_at": "2023-10-06T12:57:57.851791Z"}], "thread_id": "Thread-1", "execution_time": 1.3875014781951904, "adapter_response": {"_message": "SUCCESS", "rows_affected": -1, "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"1.6.5\", \"profile_name\": \"wri_gppd_transform\", \"target_name\": \"dev\", \"node_id\": \"test.wri_gppd_transform.unique_gppd_power_plants_list_gppd_idnr.85ac978899\"} */\nselect\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n\nselect\n gppd_idnr as unique_field,\n count(*) as n_records\n\nfrom osc_datacommons_dev.wri_gppd.gppd_power_plants_list\nwhere gppd_idnr is not null\ngroup by gppd_idnr\nhaving count(*) > 1\n\n\n\n \n ) dbt_internal_test", "query_id": "20231006_125757_00236_nybvj"}, "message": null, "failures": 0, "unique_id": "test.wri_gppd_transform.unique_gppd_power_plants_list_gppd_idnr.85ac978899"}, {"status": "fail", "timing": [{"name": "compile", "started_at": "2023-10-06T12:57:57.859890Z", "completed_at": "2023-10-06T12:57:57.865474Z"}, {"name": "execute", "started_at": "2023-10-06T12:57:57.866846Z", "completed_at": "2023-10-06T12:57:58.982658Z"}], "thread_id": "Thread-1", "execution_time": 1.1277461051940918, "adapter_response": {"_message": "SUCCESS", "rows_affected": -1, "query": "/* {\"app\": \"dbt\", \"dbt_version\": \"1.6.5\", \"profile_name\": \"wri_gppd_transform\", \"target_name\": \"dev\", \"node_id\": \"test.wri_gppd_transform.unique_gppd_power_plants_list_name.37c2d0f477\"} */\nselect\n count(*) as failures,\n count(*) != 0 as should_warn,\n count(*) != 0 as should_error\n from (\n \n \n \n\nselect\n name as unique_field,\n count(*) as n_records\n\nfrom osc_datacommons_dev.wri_gppd.gppd_power_plants_list\nwhere name is not null\ngroup by name\nhaving count(*) > 1\n\n\n\n \n ) dbt_internal_test", "query_id": "20231006_125758_00237_nybvj"}, "message": "Got 362 results, configured to fail if != 0", "failures": 362, "unique_id": "test.wri_gppd_transform.unique_gppd_power_plants_list_name.37c2d0f477"}], "elapsed_time": 6.856719255447388, "args": {"indirect_selection": "eager", "cache_selected_only": false, "log_level_file": "debug", "populate_cache": true, "printer_width": 80, "log_level": "info", "project_dir": "/opt/app-root/src/wri-gppd-ingestion-pipeline/dbt/wri_gppd_transform", "static_parser": true, "log_format": "default", "version_check": true, "log_path": "/opt/app-root/src/wri-gppd-ingestion-pipeline/dbt/wri_gppd_transform/logs", "defer": false, "quiet": false, "write_json": true, "strict_mode": false, "which": "test", "enable_legacy_logger": false, "select": [], "send_anonymous_usage_stats": true, "invocation_command": "dbt test --profiles-dir ../../../", "partial_parse": true, "warn_error_options": {"include": [], "exclude": []}, "log_format_file": "debug", "log_file_max_bytes": 10485760, "exclude": [], "use_colors_file": true, "favor_state": false, "introspect": true, "partial_parse_file_diff": true, "profiles_dir": "../../../", "use_colors": true, "vars": {}, "macro_debugging": false, "print": true}} \ No newline at end of file diff --git a/notebooks/wri-gppd-01-extraction.ipynb b/notebooks/wri-gppd-01-extraction.ipynb index 0f1d1a6..d61539e 100644 --- a/notebooks/wri-gppd-01-extraction.ipynb +++ b/notebooks/wri-gppd-01-extraction.ipynb @@ -102,7 +102,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 5, "id": "db05ee59-2dcd-4701-9ea3-527902791bce", "metadata": {}, "outputs": [ @@ -136,7 +136,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 6, "id": "1200fa03-5a23-405e-826c-d8f69065ce12", "metadata": {}, "outputs": [], @@ -147,7 +147,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 7, "id": "bbd7e846-edae-4f26-a7ac-4fd7101a277e", "metadata": {}, "outputs": [], @@ -158,7 +158,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 8, "id": "26724770-78d4-4f8d-9096-b011b911075e", "metadata": {}, "outputs": [ @@ -169,10 +169,48 @@ "[repo {\n", " name: \"wri-gppd\"\n", " type: \"user\"\n", + " project {\n", + " }\n", "}\n", "created {\n", - " seconds: 1659790074\n", - " nanos: 399079000\n", + " seconds: 1696545123\n", + " nanos: 209994000\n", + "}\n", + ", repo {\n", + " name: \"esg_equivalence\"\n", + " type: \"user\"\n", + " project {\n", + " }\n", + "}\n", + "created {\n", + " seconds: 1683265108\n", + " nanos: 101246000\n", + "}\n", + "size_bytes_upper_bound: 2058479\n", + "branches {\n", + " repo {\n", + " name: \"esg_equivalence\"\n", + " type: \"user\"\n", + " project {\n", + " }\n", + " }\n", + " name: \"master\"\n", + "}\n", + ", repo {\n", + " name: \"essd\"\n", + " type: \"user\"\n", + "}\n", + "created {\n", + " seconds: 1675479801\n", + " nanos: 1155000\n", + "}\n", + "size_bytes_upper_bound: 45686859\n", + "branches {\n", + " repo {\n", + " name: \"essd\"\n", + " type: \"user\"\n", + " }\n", + " name: \"master\"\n", "}\n", "]\n" ] @@ -185,7 +223,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 9, "id": "da287bc2-a941-48e1-82ca-4f8c725a6736", "metadata": {}, "outputs": [], @@ -199,7 +237,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 10, "id": "fc45482d-5cb7-4591-9120-9471a96c3760", "metadata": {}, "outputs": [ @@ -213,38 +251,42 @@ " repo {\n", " name: \"wri-gppd\"\n", " type: \"user\"\n", + " project {\n", + " }\n", " }\n", " name: \"master\"\n", " }\n", - " id: \"5158a5ececd8444ba3f578d277720895\"\n", + " id: \"80f3b01c72974d99b5a99543a44e3915\"\n", " }\n", " path: \"/global_power_plant_database_v_1_3/.ipynb_checkpoints/\"\n", "}\n", "file_type: DIR\n", "committed {\n", - " seconds: 1659790092\n", - " nanos: 6078000\n", + " seconds: 1696545133\n", + " nanos: 109169000\n", "}\n", - "size_bytes: 11973385\n", - "hash: \"-B\\204\\010\\340\\215[\\206GA\\300h 6\\360\\202\\360\\226.\\301fR\\242/W\\203\\377\\034\\365\\257\\375\\304\"\n", + "size_bytes: 11985591\n", + "hash: \"\\345\\240%\\314\\244\\235p\\363dk\\327\\334_\\304\\202p\\356\\361\\235\\337\\0010B\\212\\311\\312?\\323\\':~2\"\n", ", file {\n", " commit {\n", " branch {\n", " repo {\n", " name: \"wri-gppd\"\n", " type: \"user\"\n", + " project {\n", + " }\n", " }\n", " name: \"master\"\n", " }\n", - " id: \"5158a5ececd8444ba3f578d277720895\"\n", + " id: \"80f3b01c72974d99b5a99543a44e3915\"\n", " }\n", " path: \"/global_power_plant_database_v_1_3/A_Global_Database_of_Power_Plants.pdf\"\n", " datum: \"default\"\n", "}\n", "file_type: FILE\n", "committed {\n", - " seconds: 1659790092\n", - " nanos: 6078000\n", + " seconds: 1696545133\n", + " nanos: 109169000\n", "}\n", "size_bytes: 1441800\n", "hash: \".M\\370\\311\\026`\\334\\001\\000?\\342>B\\0351\\373\\021\\322\\276\\205\\025\\231\\200\\262\\270\\\"H\\330|\\260\\314\\037\"\n", @@ -254,18 +296,20 @@ " repo {\n", " name: \"wri-gppd\"\n", " type: \"user\"\n", + " project {\n", + " }\n", " }\n", " name: \"master\"\n", " }\n", - " id: \"5158a5ececd8444ba3f578d277720895\"\n", + " id: \"80f3b01c72974d99b5a99543a44e3915\"\n", " }\n", " path: \"/global_power_plant_database_v_1_3/Estimating_Power_Plant_Generation_in_the_Global_Power_Plant_Database.pdf\"\n", " datum: \"default\"\n", "}\n", "file_type: FILE\n", "committed {\n", - " seconds: 1659790092\n", - " nanos: 6078000\n", + " seconds: 1696545133\n", + " nanos: 109169000\n", "}\n", "size_bytes: 1685244\n", "hash: \"\\331\\241\\363O-\\021\\232\\362r\\375P\\313\\235\\356\\363\\223\\342\\235(R\\022\\365\\237\\375`xn%\\326\\241\\363\\342\"\n", @@ -275,18 +319,20 @@ " repo {\n", " name: \"wri-gppd\"\n", " type: \"user\"\n", + " project {\n", + " }\n", " }\n", " name: \"master\"\n", " }\n", - " id: \"5158a5ececd8444ba3f578d277720895\"\n", + " id: \"80f3b01c72974d99b5a99543a44e3915\"\n", " }\n", " path: \"/global_power_plant_database_v_1_3/README.txt\"\n", " datum: \"default\"\n", "}\n", "file_type: FILE\n", "committed {\n", - " seconds: 1659790092\n", - " nanos: 6078000\n", + " seconds: 1696545133\n", + " nanos: 109169000\n", "}\n", "size_bytes: 10659\n", "hash: \"\\017\\222\\267U\\275\\026\\010\\252\\034\\331$\\005d\\311^\\304\\246\\001\\263\\024\\233r\\374\\355 \\364!@\\237\\353T\\321\"\n", @@ -296,18 +342,20 @@ " repo {\n", " name: \"wri-gppd\"\n", " type: \"user\"\n", + " project {\n", + " }\n", " }\n", " name: \"master\"\n", " }\n", - " id: \"5158a5ececd8444ba3f578d277720895\"\n", + " id: \"80f3b01c72974d99b5a99543a44e3915\"\n", " }\n", " path: \"/global_power_plant_database_v_1_3/RELEASE_NOTES.txt\"\n", " datum: \"default\"\n", "}\n", "file_type: FILE\n", "committed {\n", - " seconds: 1659790092\n", - " nanos: 6078000\n", + " seconds: 1696545133\n", + " nanos: 109169000\n", "}\n", "size_bytes: 1547\n", "hash: \"0\\270\\222\\320fH:\\365%\\253\\304\\023M\\234%\\3663;\\002\\374p\\362\\312\\220\\r\\033z=\\351\\361\\257\\310\"\n", @@ -317,18 +365,20 @@ " repo {\n", " name: \"wri-gppd\"\n", " type: \"user\"\n", + " project {\n", + " }\n", " }\n", " name: \"master\"\n", " }\n", - " id: \"5158a5ececd8444ba3f578d277720895\"\n", + " id: \"80f3b01c72974d99b5a99543a44e3915\"\n", " }\n", " path: \"/global_power_plant_database_v_1_3/global_power_plant_database.csv\"\n", " datum: \"default\"\n", "}\n", "file_type: FILE\n", "committed {\n", - " seconds: 1659790092\n", - " nanos: 6078000\n", + " seconds: 1696545133\n", + " nanos: 109169000\n", "}\n", "size_bytes: 11973385\n", "hash: \"\\304|:tF\\261\\020&\\267;\\340\\217\\241U\\361;\\030le \\024\\200\\021\\363R\\230t\\003\\\"5\\261\\363\"\n", @@ -343,7 +393,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "id": "09917ed2-a9bc-469b-87bc-b093c11ea39c", "metadata": {}, "outputs": [], diff --git a/notebooks/wri-gppd-02-loading.ipynb b/notebooks/wri-gppd-02-loading.ipynb index ab0a563..c2786ba 100644 --- a/notebooks/wri-gppd-02-loading.ipynb +++ b/notebooks/wri-gppd-02-loading.ipynb @@ -22,7 +22,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "id": "12ea025c-b859-4e57-88a0-30d48d42302b", "metadata": {}, "outputs": [], @@ -53,7 +53,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "id": "3fcc12b1-067c-4eb7-bd7f-63aa8c3b0667", "metadata": {}, "outputs": [ @@ -72,7 +72,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "id": "161992e0-45da-4912-b91e-f97b0030e4ab", "metadata": {}, "outputs": [], @@ -97,7 +97,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 5, "id": "1e785101-ad84-4382-a725-8bb0c1280ed8", "metadata": {}, "outputs": [], @@ -116,7 +116,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "id": "1200fa03-5a23-405e-826c-d8f69065ce12", "metadata": {}, "outputs": [], @@ -127,7 +127,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "id": "660dac53-a872-4c62-be59-6593f359388d", "metadata": {}, "outputs": [], @@ -139,7 +139,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "id": "e6087e48-070f-4a4e-ad5a-2c147f7c57f0", "metadata": {}, "outputs": [ @@ -200,7 +200,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "id": "b844893b-383e-4134-b4be-8ff7b960472f", "metadata": {}, "outputs": [ @@ -434,7 +434,7 @@ "[5 rows x 36 columns]" ] }, - "execution_count": 8, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -453,7 +453,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 10, "id": "8ad0a521-0051-437c-8d3b-31e7ffcbfc9d", "metadata": {}, "outputs": [], @@ -464,7 +464,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 11, "id": "6028862a-ff2d-4e30-bd17-c57f4c396db6", "metadata": {}, "outputs": [], @@ -484,7 +484,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 12, "id": "edc9ff36-00e0-47b2-87e3-1c908e72facd", "metadata": {}, "outputs": [], @@ -498,7 +498,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 13, "id": "9a6e4160-86fb-4107-a01f-fa2213c3091b", "metadata": {}, "outputs": [ @@ -516,7 +516,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 14, "id": "2cb4b34d-6f8d-4758-9420-8767c77e2d12", "metadata": {}, "outputs": [ @@ -524,7 +524,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "[('aicoe_osc_demo_results',), ('default',), ('demo_dv',), ('essd',), ('iceberg_demo',), ('information_schema',), ('ingest',), ('mdt_sandbox',), ('pcaf_sovereign_footprint',), ('sandbox',)]\n" + "[('aicoe_osc_demo_results',), ('default',), ('demo_dv',), ('dera',), ('essd',), ('iceberg_demo',), ('information_schema',), ('ingest',), ('mdt_sandbox',), ('pcaf_sovereign_footprint',), ('rmi',), ('sandbox',), ('wri_gppd',)]\n" ] } ], @@ -539,7 +539,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 15, "id": "49b0c38c-dfe3-4427-aa12-2da982c71bcc", "metadata": {}, "outputs": [ @@ -551,8 +551,15 @@ "create schema if not exists osc_datacommons_dev.wri_gppd with (\n", " location ='s3a://osc-datacommons-s3-bucket-dev02/data/wri_gppd.db/'\n", ")\n", - "\n", - "[(True,)]\n" + "\n" + ] + }, + { + "ename": "ResourceClosedError", + "evalue": "This result object does not return rows. It has been closed automatically.", + "output_type": "error", + "traceback": [ + "\u001b[0;31mResourceClosedError\u001b[0m\u001b[0;31m:\u001b[0m This result object does not return rows. It has been closed automatically.\n" ] } ], @@ -570,15 +577,16 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 16, "id": "d948d6f7-9aca-42dd-bfce-6ca50b37557d", "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "[(True,)]\n" + "ename": "ResourceClosedError", + "evalue": "This result object does not return rows. It has been closed automatically.", + "output_type": "error", + "traceback": [ + "\u001b[0;31mResourceClosedError\u001b[0m\u001b[0;31m:\u001b[0m This result object does not return rows. It has been closed automatically.\n" ] } ], @@ -593,7 +601,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 17, "id": "4e1a8013-015b-4a46-b647-e68664a06338", "metadata": {}, "outputs": [ @@ -645,179 +653,178 @@ " format = 'parquet',\n", " partitioning = array['country']\n", ")\n", - "[(True,)]\n", "\n", "staging dataframe parquet to s3 osc-datacommons-s3-bucket-dev02\n", - "/tmp/ingest_temp_e631eab3/country=AFG/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=AFG/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=ALB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=ALB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=DZA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=DZA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=AGO/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=AGO/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=ATA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=ATA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=ARG/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=ARG/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=ARM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=ARM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=AUS/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=AUS/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=AUT/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=AUT/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=AZE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=AZE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=BHR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=BHR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=BGD/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=BGD/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=BLR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=BLR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=BEL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=BEL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=BEN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=BEN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=BTN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=BTN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=BOL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=BOL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=BIH/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=BIH/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=BWA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=BWA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=BRA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=BRA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=BRN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=BRN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=BGR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=BGR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=BFA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=BFA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=BDI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=BDI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=KHM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=KHM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=CMR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=CMR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=CAN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=CAN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=CPV/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=CPV/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=CAF/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=CAF/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=CHL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=CHL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=CHN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=CHN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=COL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=COL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=COG/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=COG/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=CRI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=CRI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=CIV/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=CIV/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=HRV/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=HRV/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=CUB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=CUB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=CYP/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=CYP/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=CZE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=CZE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=COD/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=COD/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=DNK/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=DNK/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=DJI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=DJI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=ECU/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=ECU/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=EGY/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=EGY/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=SLV/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=SLV/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=GNQ/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=GNQ/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=ERI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=ERI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=EST/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=EST/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=ETH/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=ETH/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=FJI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=FJI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=FIN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=FIN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=DOM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=DOM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=FRA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=FRA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=GUF/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=GUF/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=GAB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=GAB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=GMB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=GMB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=GEO/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=GEO/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=DEU/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=DEU/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=GHA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=GHA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=GRC/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=GRC/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=GTM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=GTM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=GIN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=GIN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=GNB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=GNB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=GUY/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=GUY/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=HND/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=HND/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=HUN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=HUN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=ISL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=ISL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=IND/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=IND/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=IDN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=IDN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=IRN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=IRN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=IRL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=IRL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=IRQ/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=IRQ/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=ISR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=ISR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=ITA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=ITA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=JAM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=JAM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=JPN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=JPN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=JOR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=JOR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=KAZ/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=KAZ/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=KEN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=KEN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=KOS/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=KOS/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=KWT/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=KWT/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=KGZ/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=KGZ/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=LAO/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=LAO/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=LVA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=LVA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=LBN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=LBN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=LSO/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=LSO/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=LBR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=LBR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=LBY/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=LBY/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=LTU/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=LTU/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=LUX/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=LUX/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=MKD/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=MKD/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=MDG/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=MDG/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=MWI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=MWI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=MYS/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=MYS/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=MLI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=MLI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=MRT/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=MRT/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=MUS/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=MUS/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=MEX/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=MEX/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=MDA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=MDA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=MNG/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=MNG/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=MNE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=MNE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=MAR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=MAR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=MOZ/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=MOZ/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=MMR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=MMR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=NAM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=NAM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=NPL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=NPL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=NLD/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=NLD/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=NZL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=NZL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=NIC/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=NIC/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=NER/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=NER/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=NGA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=NGA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=PRK/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=PRK/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=NOR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=NOR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=OMN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=OMN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=PAK/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=PAK/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=PSE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=PSE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=PAN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=PAN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=PNG/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=PNG/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=PRY/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=PRY/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=PER/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=PER/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=PHL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=PHL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=POL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=POL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=PRT/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=PRT/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=QAT/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=QAT/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=ROU/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=ROU/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=RUS/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=RUS/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=RWA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=RWA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=LCA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=LCA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=SAU/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=SAU/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=SEN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=SEN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=SRB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=SRB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=SLE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=SLE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=SGP/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=SGP/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=SVK/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=SVK/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=SVN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=SVN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=ZAF/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=ZAF/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=KOR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=KOR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=ESP/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=ESP/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=LKA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=LKA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=SDN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=SDN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=SUR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=SUR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=SWZ/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=SWZ/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=SWE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=SWE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=CHE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=CHE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=SYR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=SYR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=TWN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=TWN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=TJK/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=TJK/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=TZA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=TZA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=THA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=THA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=TGO/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=TGO/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=TTO/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=TTO/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=TUN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=TUN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=TUR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=TUR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=TKM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=TKM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=UGA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=UGA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=UKR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=UKR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=ARE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=ARE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=GBR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=GBR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=USA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=USA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=URY/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=URY/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=UZB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=UZB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=VEN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=VEN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=VNM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=VNM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=ESH/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=ESH/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=YEM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=YEM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=ZMB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=ZMB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", - "/tmp/ingest_temp_e631eab3/country=ZWE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet --> trino/ingest/ingest_temp_e631eab3/country=ZWE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=AFG/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=AFG/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=ALB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=ALB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=DZA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=DZA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=AGO/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=AGO/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=ATA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=ATA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=ARG/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=ARG/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=ARM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=ARM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=AUS/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=AUS/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=AUT/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=AUT/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=AZE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=AZE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=BHR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=BHR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=BLR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=BLR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=BGD/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=BGD/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=BEL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=BEL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=BEN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=BEN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=BTN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=BTN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=BOL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=BOL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=BIH/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=BIH/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=BWA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=BWA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=BRA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=BRA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=BRN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=BRN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=BGR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=BGR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=BFA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=BFA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=BDI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=BDI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=KHM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=KHM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=CMR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=CMR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=CAN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=CAN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=CPV/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=CPV/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=CAF/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=CAF/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=CHL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=CHL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=CHN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=CHN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=COL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=COL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=COG/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=COG/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=CRI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=CRI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=CIV/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=CIV/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=HRV/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=HRV/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=CUB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=CUB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=CYP/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=CYP/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=CZE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=CZE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=COD/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=COD/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=DNK/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=DNK/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=DJI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=DJI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=ECU/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=ECU/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=EGY/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=EGY/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=SLV/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=SLV/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=GNQ/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=GNQ/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=ERI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=ERI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=EST/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=EST/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=ETH/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=ETH/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=FJI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=FJI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=FIN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=FIN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=DOM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=DOM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=FRA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=FRA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=GUF/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=GUF/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=GAB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=GAB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=GMB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=GMB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=GEO/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=GEO/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=DEU/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=DEU/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=GHA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=GHA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=GRC/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=GRC/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=GTM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=GTM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=GIN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=GIN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=GNB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=GNB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=GUY/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=GUY/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=HND/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=HND/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=HUN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=HUN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=ISL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=ISL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=IND/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=IND/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=IDN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=IDN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=IRN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=IRN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=IRQ/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=IRQ/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=IRL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=IRL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=ISR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=ISR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=ITA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=ITA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=JAM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=JAM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=JPN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=JPN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=JOR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=JOR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=KAZ/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=KAZ/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=KEN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=KEN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=KOS/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=KOS/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=KWT/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=KWT/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=KGZ/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=KGZ/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=LAO/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=LAO/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=LVA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=LVA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=LBN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=LBN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=LSO/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=LSO/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=LBR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=LBR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=LBY/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=LBY/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=LTU/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=LTU/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=LUX/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=LUX/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=MKD/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=MKD/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=MDG/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=MDG/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=MWI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=MWI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=MYS/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=MYS/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=MLI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=MLI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=MRT/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=MRT/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=MUS/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=MUS/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=MEX/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=MEX/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=MDA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=MDA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=MNG/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=MNG/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=MNE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=MNE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=MAR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=MAR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=MOZ/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=MOZ/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=MMR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=MMR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=NAM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=NAM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=NPL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=NPL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=NLD/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=NLD/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=NZL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=NZL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=NIC/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=NIC/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=NER/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=NER/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=NGA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=NGA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=PRK/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=PRK/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=NOR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=NOR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=OMN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=OMN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=PAK/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=PAK/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=PSE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=PSE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=PAN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=PAN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=PNG/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=PNG/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=PRY/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=PRY/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=PER/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=PER/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=PHL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=PHL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=POL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=POL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=PRT/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=PRT/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=QAT/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=QAT/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=ROU/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=ROU/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=RUS/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=RUS/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=RWA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=RWA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=LCA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=LCA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=SAU/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=SAU/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=SEN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=SEN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=SRB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=SRB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=SLE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=SLE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=SGP/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=SGP/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=SVK/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=SVK/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=SVN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=SVN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=ZAF/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=ZAF/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=KOR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=KOR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=ESP/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=ESP/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=LKA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=LKA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=SDN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=SDN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=SUR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=SUR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=SWZ/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=SWZ/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=SWE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=SWE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=CHE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=CHE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=SYR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=SYR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=TWN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=TWN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=TJK/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=TJK/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=TZA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=TZA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=THA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=THA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=TGO/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=TGO/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=TTO/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=TTO/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=TUN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=TUN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=TUR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=TUR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=TKM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=TKM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=UGA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=UGA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=UKR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=UKR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=ARE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=ARE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=GBR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=GBR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=USA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=USA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=URY/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=URY/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=UZB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=UZB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=VEN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=VEN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=VNM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=VNM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=ESH/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=ESH/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=YEM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=YEM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=ZMB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=ZMB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", + "/tmp/ingest_temp_93be0e7b/country=ZWE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet --> trino/ingest/ingest_temp_93be0e7b/country=ZWE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet\n", "\n", - "declaring intermediate hive table osc_datacommons_hive_ingest.ingest.ingest_temp_e631eab3\n", - "create table if not exists osc_datacommons_hive_ingest.ingest.ingest_temp_e631eab3 (\n", + "declaring intermediate hive table osc_datacommons_hive_ingest.ingest.ingest_temp_93be0e7b\n", + "create table if not exists osc_datacommons_hive_ingest.ingest.ingest_temp_93be0e7b (\n", " country_long varchar,\n", " name varchar,\n", " gppd_idnr varchar,\n", @@ -857,25 +864,23 @@ ") with (\n", " format = 'parquet',\n", " partitioned_by = array['country'],\n", - " external_location = 's3a://osc-datacommons-s3-bucket-dev02/trino/ingest/ingest_temp_e631eab3/'\n", + " external_location = 's3a://osc-datacommons-s3-bucket-dev02/trino/ingest/ingest_temp_93be0e7b/'\n", ")\n", - "[(True,)]\n", "\n", "syncing partition metadata on intermediate hive table\n", - "call osc_datacommons_hive_ingest.system.sync_partition_metadata('ingest', 'ingest_temp_e631eab3', 'FULL')\n", - "[(True,)]\n", + "call osc_datacommons_hive_ingest.system.sync_partition_metadata('ingest', 'ingest_temp_93be0e7b', 'FULL')\n", "\n", "overwriting data in osc_datacommons_dev.wri_gppd.gppd_source\n", "delete from osc_datacommons_dev.wri_gppd.gppd_source\n", "[(None,)]\n", "\n", - "transferring data: osc_datacommons_hive_ingest.ingest.ingest_temp_e631eab3 -> osc_datacommons_dev.wri_gppd.gppd_source\n", + "transferring data: osc_datacommons_hive_ingest.ingest.ingest_temp_93be0e7b -> osc_datacommons_dev.wri_gppd.gppd_source\n", "insert into osc_datacommons_dev.wri_gppd.gppd_source\n", - "select * from osc_datacommons_hive_ingest.ingest.ingest_temp_e631eab3\n", + "select * from osc_datacommons_hive_ingest.ingest.ingest_temp_93be0e7b\n", "[(34936,)]\n", "\n", - "deleting table and data for intermediate table osc_datacommons_hive_ingest.ingest.ingest_temp_e631eab3\n", - "[{'ResponseMetadata': {'RequestId': '1Y7SAG1BW1BEFMQP', 'HostId': 'Enb0pDld3I8nb3uE70vrX6u0uYeTdatlKkm3/WNtgSyiJtZHv327jNsgJpfr0t8cSf5WrbKBdc4=', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amz-id-2': 'Enb0pDld3I8nb3uE70vrX6u0uYeTdatlKkm3/WNtgSyiJtZHv327jNsgJpfr0t8cSf5WrbKBdc4=', 'x-amz-request-id': '1Y7SAG1BW1BEFMQP', 'date': 'Sun, 02 Oct 2022 07:04:11 GMT', 'content-type': 'application/xml', 'transfer-encoding': 'chunked', 'server': 'AmazonS3', 'connection': 'close'}, 'RetryAttempts': 0}, 'Deleted': [{'Key': 'trino/ingest/ingest_temp_e631eab3/country=BHR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=ISR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=NGA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=NPL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=HND/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=UGA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=IDN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=TTO/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=DNK/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=GTM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=PRT/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=TJK/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=OMN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=JAM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=POL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=PRK/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=CUB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=GBR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=PRY/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=MNE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=RWA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=ARG/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=IND/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=EGY/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=LKA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=LTU/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=DEU/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=LBN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=MAR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=BFA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=KGZ/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=LBY/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=HUN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=BGR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=UZB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=ISL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=LSO/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=ESH/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=HRV/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=MWI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=MOZ/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=DJI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=CHE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=KEN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=ROU/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=BEL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=MRT/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=BEN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=BRN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=COG/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=TUN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=CPV/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=USA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=ETH/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=NZL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=PSE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=AZE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=NOR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=PER/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=KOR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=FJI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=VNM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=QAT/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=CHL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=ZAF/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=LVA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=TUR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=MYS/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=ATA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=CRI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=MUS/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=RUS/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=SDN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=GUF/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=LCA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=URY/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=NER/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=BWA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=SWE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=GIN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=SYR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=SLV/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=TGO/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=GRC/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=SLE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=AUT/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=BLR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=MLI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=AGO/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=CAN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=MKD/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=YEM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=MEX/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=GUY/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=IRL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=CHN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=CMR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=MMR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=ZMB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=LUX/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=JOR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=PAK/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=SWZ/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=SRB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=GEO/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=ESP/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=DZA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=CIV/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=CAF/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=ARM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=COD/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=ALB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=NAM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=BGD/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=BTN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=FIN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=SGP/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=EST/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=GHA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=CZE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=UKR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=TKM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=ZWE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=COL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=KHM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=ARE/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=NLD/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=JPN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=SVN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=ITA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=NIC/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=GNB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=AFG/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=KAZ/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=TWN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=LBR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=SAU/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=PNG/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=GAB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=SVK/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=KOS/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=MDG/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=LAO/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=CYP/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=THA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=PAN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=IRN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=BOL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=BRA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=GMB/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=MDA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=SUR/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=GNQ/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=TZA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=IRQ/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=PHL/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=ERI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=VEN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=BDI/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=FRA/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=BIH/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=MNG/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=ECU/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=KWT/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=SEN/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=AUS/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_e631eab3/country=DOM/cb3c63778d184a2ea2b22e2d5ac030d9-0.parquet'}]}]\n" + "deleting table and data for intermediate table osc_datacommons_hive_ingest.ingest.ingest_temp_93be0e7b\n", + "[{'ResponseMetadata': {'RequestId': 'H571MZCGCA92G9VF', 'HostId': 'BP8RABuV3Ell7m1R2w5lPiXEfNxuDH0XLZgfmb3n9LL2OoaBJGJYGYnElk5uZpjAQigbnHSGUis=', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amz-id-2': 'BP8RABuV3Ell7m1R2w5lPiXEfNxuDH0XLZgfmb3n9LL2OoaBJGJYGYnElk5uZpjAQigbnHSGUis=', 'x-amz-request-id': 'H571MZCGCA92G9VF', 'date': 'Thu, 05 Oct 2023 22:34:32 GMT', 'content-type': 'application/xml', 'transfer-encoding': 'chunked', 'server': 'AmazonS3', 'connection': 'close'}, 'RetryAttempts': 0}, 'Deleted': [{'Key': 'trino/ingest/ingest_temp_93be0e7b/country=COG/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=KWT/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=BEL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=ARG/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=ERI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=UZB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=GMB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=SVK/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=URY/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=IDN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=GBR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=SGP/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=LKA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=DZA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=BRA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=MRT/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=AGO/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=TWN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=ZWE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=BWA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=KEN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=NLD/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=PHL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=THA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=GNQ/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=PSE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=BLR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=IND/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=BEN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=EGY/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=TGO/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=GUY/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=MDA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=NPL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=SDN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=NGA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=MEX/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=SYR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=TKM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=GUF/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=CYP/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=NER/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=UGA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=KAZ/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=ECU/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=CAF/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=OMN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=COD/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=BTN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=JOR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=IRQ/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=GRC/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=CZE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=NOR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=PNG/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=UKR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=PAN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=USA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=AUT/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=LBN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=AZE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=FJI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=CRI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=SWZ/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=TUR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=MDG/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=LSO/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=KOR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=BIH/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=BRN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=PAK/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=SAU/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=VNM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=COL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=NAM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=IRL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=CMR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=MNE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=GEO/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=GAB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=TJK/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=AUS/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=DNK/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=MLI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=PER/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=NZL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=CHL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=NIC/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=TUN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=RWA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=TTO/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=HND/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=ESH/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=KOS/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=KGZ/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=PRT/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=IRN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=ISL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=MYS/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=PRK/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=CAN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=MOZ/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=BGR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=KHM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=JAM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=LBR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=MKD/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=ARE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=GIN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=SEN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=CHE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=RUS/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=SLE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=CHN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=AFG/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=SRB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=ISR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=SWE/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=VEN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=MWI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=LUX/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=MMR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=CIV/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=GNB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=QAT/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=ALB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=EST/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=BOL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=FRA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=LAO/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=ETH/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=MAR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=BHR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=PRY/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=ATA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=HUN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=SVN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=MUS/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=FIN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=ITA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=SUR/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=POL/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=LCA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=TZA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=JPN/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=BDI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=LBY/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=CPV/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=ARM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=LTU/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=DJI/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=YEM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=ZAF/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=GHA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=SLV/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=DOM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=CUB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=ZMB/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=HRV/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=GTM/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=DEU/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=ESP/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=BGD/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=MNG/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=BFA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=ROU/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}, {'Key': 'trino/ingest/ingest_temp_93be0e7b/country=LVA/549dfeb16cdf4673983665e47b5f0bd2-0.parquet'}]}]\n" ] } ],